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

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

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Sep 21, 2016, 14:46 UTC
Message-ID
<affca640-4ed8-268a-9f7d-e2c7ce6d66fc@drmicha.warpmail.net>
In-Reply-To
<xmqq8tunhns4.fsf@gitster.mtv.corp.google.com>
Junio C Hamano venit, vidit, dixit 19.09.2016 18:12:
Show 22 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>>> It can be read that
>>>
>>> $ git cherry-pick maint next
>>>
>>> would pick two single commits, while
>>>
>>> $ git cherry-pick maint next ^master
>>>
>>> could implicitly be read as
>>>
>>> $ git cherry-pick maint next --do-walk ^master
> 
> You can read it as "master..next maint" that does force walking.
> 
>>> Clearly that's not what is intended, which is
>>>
>>> $ git cherry-pick --do-walk maint next ^master
> 
> I do not see the distinction betwee the above two you seem to be
> trying to make.  Care to explain?

I think you answered to e-mail (in-reply-to) and to Philip's actual text (quotes), but just in case:

[git]✓ git rev-list --no-walk ^HEAD~3 HEAD 47d74601f5c6bbef215a887be2ca877e34391c9f 574dece7b651fbae385add51d7aaea1cc414007a 3fbbf6e9e40b151215cce6c6e25cd4db0232d870 [git]✓ git rev-list ^HEAD~3 --no-walk HEAD 47d74601f5c6bbef215a887be2ca877e34391c9f

The order of revision arguments and options does play role (but where I put my HEAD does not, uhm), i.e. walk-options vs. negative refs.

The reason is that negative revs come with an implicit --do-walk (we need to walk to mark uninteresting revs), and the last --do-walk/--no-walk wins. That's what I meant with my comment.

But there is only one walk (or none), and one setting effective for all revision arguments.

Michael
Previous: Philip OakleyNext: Michael J Gruber
Message 11 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.