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

Re: [PATCH 1/2] test for '!' handling in rev-parse's named commits

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 3, 2015, 23:12 UTC
Message-ID
<xmqq7frkwfmw.fsf@gitster.dls.corp.google.com>
In-Reply-To
<xmqqbngwwjbd.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 17 quoted lines
> The anticipation is to use another feature introducer after "/!" to
> enhance the matching, so that we can keep enhancing the syntax.
>
> cf. http://thread.gmane.org/gmane.comp.version-control.git/40460/focus=40477
>
> Using "/!Message" to match commits that do not match Message
> directly goes against that extensivility design.
>
> We need to always remind ourselves that our latest shiny new toy
> will not be the final new feature.  There always will be need to add
> yet another new thing, and we need to keep the door open for them.
>
> Perhaps
>
> 	/!-string	-> find commit without "string"
>
> or something?

Of course, as I do not think it is something people would do regularly to look for a non-match, I do not necessarily think we need a short-hand "/!-string". Perhaps following the long-hand syntax suggested in that old article, it may be sensible to start with something more descriptive like

	/!(negative)string

to look for a commit that does not say "string", without the short-hand form. Only after we see that people find the feature useful and find the need to use it frequently (if it ever happens, that is), we can introduce "/!-string" as a short-hand form as a follow-up patch.

Thanks.
Previous: Junio C HamanoNext: Will Palmer
Message 6 of 7 in “specify commit by negative pattern”
  1. 0/2 specify commit by negative patternWill Palmer, Jun 3, 2015
  2. 1/2 test for '!' handling in rev-parse's named commitsWill Palmer, Jun 3, 2015
  3. Junio C HamanoJun 3, 2015
  4. Will PalmerJun 3, 2015
  5. Junio C HamanoJun 4, 2015
  6. Junio C HamanoJun 3, 2015
  7. 2/2 object name: introduce '^{/!<negative pattern>}' notationWill Palmer, Jun 3, 2015

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.