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

Re: Weird revision walk behaviour

From
Jeff King <peff@peff.net>
Date
May 23, 2018, 17:32 UTC
Message-ID
<20180523173246.GA10299@sigill.intra.peff.net>
In-Reply-To
<CAM0VKjkr71qLfksxZy59o4DYCM-x=podsCf6Qv+PzZuSe1gXZw@mail.gmail.com>
On Wed, May 23, 2018 at 07:10:58PM +0200, SZEDER Gábor wrote:
Show 10 quoted lines
>   $ git log --oneline master..ba95710a3b -- ci/
>   ea44c0a594 Merge branch 'bw/protocol-v2' into jt/partial-clone-proto-v2
> 
> But as far as I can tell, there are no changes in the 'ci/' directory
> on any of the merge's parents:
> 
>   $ git log --oneline master..ea44c0a594^1 -- ci/
>   # Nothing.
>   $ git log --oneline master..ea44c0a594^2 -- ci/
>   # Nothing!

Hmm. That commit does touch "ci/" with respect to one of its parents. It should get simplified away because it completely matches the other parent, so it does sound like a bug.

Show 5 quoted lines
> This is not specific to the 'ci/' directory, it seems that any
> untouched directory does the trick:
> 
>   $ git log --oneline master..ea44c0a594 -- contrib/coccinelle/ t/lib-httpd/
>   ea44c0a594 Merge branch 'bw/protocol-v2' into jt/partial-clone-proto-v2

Both of those directories also differ between one parent. If you try it with "contrib/remote-helpers", which does not, then the commit does not appear.

So it does seem like a bug where we should be simplifying away the merge but are not (or I'm missing the corner case, too ;) ).

> I get the same behavior with Git built from current master and from
> past releases as well (tried it as far back as v2.0.0).

I keep some older builds around, and it does not reproduce with v1.6.6.3 (that's my usual goto for "old"). Bisecting turns up d0af663e42 (revision.c: Make --full-history consider more merges, 2013-05-16). It looks like an unintended change (the commit message claims that the non-full-history case shouldn't be affected).

-Peff
Previous: SZEDER GáborNext: Jeff King
Message 2 of 12 in “Weird revision walk behaviour”
  1. SZEDER GáborMay 23, 2018
  2. Jeff KingMay 23, 2018
  3. Jeff KingMay 23, 2018
  4. Kevin BraceyMay 24, 2018
  5. Kevin BraceyMay 24, 2018
  6. Kevin BraceyMay 27, 2018
  7. SZEDER GáborMay 28, 2018
  8. Kevin BraceyMay 29, 2018
  9. Jeff KingMay 29, 2018
  10. Kevin BraceyMay 30, 2018
  11. Jeff KingMay 31, 2018
  12. Kevin BraceyMay 31, 2018

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.