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

Re: clarification of `rev-list --no-walk ^<rev>`?

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 19, 2016, 16:19 UTC
Message-ID
<xmqq4m5bhnfg.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<033051503D8C4F618B1E4879AFF8C28D@PhilipOakley>
"Philip Oakley" <philipoakley@iee.org> writes:
Show 7 quoted lines
> At the moment the cherry-pick man page's example implies that
> --do-walk is applied from the beginning, rather from the point given
> on the command line.
>
> I had a very quick search of the *.c code for the options but didn't
> get any further. Hopefully the user issue/misunderstanding is
> elsewhere... I'll add this to my little list.

I think the confusion is coming from not understanding that revision specifiers cannot have position-dependent semantics, because there is no "union of multiple sets". You said

	commits in 'master..next' range and the tip of 'maint'

earlier, and that is a prime specimen of that confusion. That is asking "things reachable from next excluding things reachable from master" computed independently from everything else on the command line (i.e. that is one set), and "the commit at the tip of 'maint'" (i.e. that is another set, which consists of a singleton element), and wanting to take a union of it. But the revision machinery is not structured to work that way. It can only do "reachable from one enumeration of positive tips, excluding ones reachable from another enumeration of negative tips". "no-walk" is a cheap hack that tells the machinery "stop after collecting that 'one enumeration of positive tips' and do not walk. Make that enumeration the resulting set". Having anything negative in the enumeration of starting points from the command line automatically turns "no-walk" off, even for commands that default to "no-walk".

We may need further documentation updates to unconfuse readers.
Previous: Philip OakleyNext: Junio C Hamano
Message 4 of 13 in “clarification of `rev-list --no-walk ^<rev>`?”
  1. Philip OakleySep 19, 2016
  2. Michael J GruberSep 19, 2016
  3. Philip OakleySep 19, 2016
  4. Junio C HamanoSep 19, 2016
  5. Junio C HamanoSep 19, 2016
  6. Philip OakleySep 19, 2016
  7. Junio C HamanoSep 19, 2016
  8. Philip OakleySep 19, 2016
  9. Junio C HamanoSep 19, 2016
  10. Philip OakleySep 19, 2016
  11. Michael J GruberSep 21, 2016
  12. Michael J GruberSep 21, 2016
  13. Junio C HamanoSep 21, 2016

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.