git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/5] describe: teach describe negative pattern matches

From
Jacob Keller <jacob.keller@gmail.com>
Date
Jan 18, 2017, 21:04 UTC
Message-ID
<CA+P7+xp6c_3gTWiSrZHuXrpeZxYPguYBaBOT+uwKwATx4+1npw@mail.gmail.com>
In-Reply-To
<alpine.DEB.2.20.1701181340530.3469@virtualbox>

On Wed, Jan 18, 2017 at 4:44 AM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 46 quoted lines
> Hi Jake,
>
> On Tue, 17 Jan 2017, Jacob Keller wrote:
>
>> On Fri, Jan 13, 2017 at 1:31 PM, Johannes Sixt <j6t@kdbg.org> wrote:
>> > Am 13.01.2017 um 07:57 schrieb Jacob Keller:
>> >>
>> >> On Thu, Jan 12, 2017 at 10:43 PM, Johannes Sixt <j6t@kdbg.org> wrote:
>> >>>
>> >>>  When you write
>> >>>
>> >>>   git log --branches --exclude=origin/* --remotes
>> >>>
>> >>> --exclude=origin/* applies only to --remotes, but not to --branches.
>> >>
>> >>
>> >> Well for describe I don't think the order matters.
>> >
>> >
>> > That is certainly true today. But I would value consistency more. We would
>> > lose it if some time in the future 'describe' accepts --branches and
>> > --remotes in addition to --tags and --all.
>> >
>> > -- Hannes
>> >
>>
>> I am not sure that the interface for git-log and git-describe are
>> similar enough to make this distinction work. --match already seems to
>> imply that it only works on refs in refs/tags, as it says it considers
>> globs matching excluding the "refs/tags" prefix.
>>
>> In git-describe, we already have "--tags" and "--all" but they are
>> mutually exclusive. We don't support using more than one at once, and
>> I'm not really convinced that describe will ever support more than one
>> at a time. Additionally, match already doesn't respect order.
>
> I agree that it would keep the code much simpler if you kept the order
> "exclude before include".
>
> However, should you decide to look into making the logic dependent on the
> order in which the flags were specified in the command-line, we do have a
> data structure for such a beast: we use it in gitignore and in
> sparse-checkout, it is called struct exclude_list.
>
> Just some food for thought,
> Johannes
That might help make it easier to go this route. I'll take a look.

Thanks, Jake

Previous: Johannes SchindelinNext: Jacob Keller
Message 12 of 25 in “extend git-describe pattern matching”
  1. 0/5 extend git-describe pattern matchingJacob Keller, Jan 12, 2017
  2. 5/5 describe: teach describe negative pattern matchesJacob Keller, Jan 12, 2017
  3. Johannes SchindelinJan 12, 2017
  4. Junio C HamanoJan 12, 2017
  5. Johannes SixtJan 12, 2017
  6. Jacob KellerJan 13, 2017
  7. Johannes SixtJan 13, 2017
  8. Jacob KellerJan 13, 2017
  9. Johannes SixtJan 13, 2017
  10. Jacob KellerJan 17, 2017
  11. Johannes SchindelinJan 18, 2017
  12. Jacob KellerJan 18, 2017
  13. 4/5 describe: teach --match to accept multiple patternsJacob Keller, Jan 12, 2017
  14. 2/5 name-rev: extend --refs to accept multiple patternsJacob Keller, Jan 12, 2017
  15. Johannes SchindelinJan 12, 2017
  16. Jacob KellerJan 13, 2017
  17. 3/5 name-rev: add support to discard refs by pattern matchJacob Keller, Jan 12, 2017
  18. Johannes SchindelinJan 12, 2017
  19. Jacob KellerJan 13, 2017
  20. 1/5 doc: add documentation for OPT_STRING_LISTJacob Keller, Jan 12, 2017
  21. Johannes SchindelinJan 12, 2017
  22. Jacob KellerJan 13, 2017
  23. Johannes SchindelinJan 12, 2017
  24. Junio C HamanoJan 13, 2017
  25. Jacob KellerJan 13, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.