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, 21:52 UTC
Message-ID
<xmqqbngwwjbd.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1433364854-30088-2-git-send-email-wmpalmer@gmail.com>
Will Palmer <wmpalmer@gmail.com> writes:
> Specifically, as documented: '^{/!Message}' should fail, as this syntax
> is currently reserved; while '^{!!Message}' should search for a commit
> whose message contains the string "!Message".

The /! sequence being reserved does not mean it was planned to be used only for a single thing in the future, though.

Think of it as a syntax to introduce extended features, the first use of which was this:

	/!!string	-> find commit with "!string"

The above is just one "feature" that the reserved syntax allows, namely, "to find a string that begins with an exclamation mark". 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?
Previous: Will PalmerNext: Will Palmer
Message 3 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.