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

Re: Bizarre missing changes (git bug?)

From
Tim Harper <timcharper@gmail.com>
Date
Jul 21, 2008, 22:53 UTC
Message-ID
<E301C92A-8794-4E90-9C85-D73B94A2648C@gmail.com>
In-Reply-To
<alpine.LFD.1.10.0807211331390.31863@woody.linux-foundation.org>
On Jul 21, 2008, at 2:37 PM, Linus Torvalds wrote:
Show 33 quoted lines
>
>
> On Mon, 21 Jul 2008, Tim Harper wrote:
>>
>> Anyone run into this before?  Any idea what might have caused it?   
>> We're a bit
>> concerned about this because if we don't know how to avoid this, we  
>> no longer
>> can feel certain that when something is committed, it will make it  
>> out in our
>> release.
>
> Read up on '--full-history'.
>
> By default, git simplifies the history for logs that have path
> simplification: only walking down the side of a merge that all the  
> data
> came from (ie the unchanged side). So it only leaves merges around if
> there was changes from _all_ parents.
>
> So without --full-history, if any parent matches the state, it just
> removes the merge and picks that parent that contained all the state.
> Obviously, any changes to that file can be sufficiently explained by
> walking just that limited history, because they must have changed in
> _that_ history too!
>
> That default behaviour leads to a *much* simpler history, and is  
> usually
> what you want - it avoids unnecessary duplication when something was
> changed trivially the same way in both branches - 'git log' will  
> just pick
> the first branch.
>
Agreed - this was an insightful decision.
Show 12 quoted lines
> So, if you had two (or more) commits that both fixed the same bug in
> different branches, and thus both branches actually ended up with  
> the same
> contents, it does mean that "git log <filename>" will only show  
> _one_ of
> the fixes.
>
> In this case, it apparently showed another version than the one you  
> were
> looking for.
>
> 				Linus

Git has made me feel stupid on various occasions. This is no exception as the problem turned out being in the chair, not in git.

After running through git bisect, and ran the command Alex Riesen suggested, it made it pretty crystal clear where things went wrong. It turned out to be a bad merge that was from a conflict related to white-space issues, and the wrong resolution was chosen (a resolution that also consequently turned out to be no change).

Another false impression I had is a merge conflict resolution would always be displayed in a merge commit. However, after running over the merges again, if you pick the right or left, discarding the one or the other, nothing is shown in "git log -p" for the merge commit. Is there a way to see what was chosen for a conflict resolution? Seeing that in the merge commit would have made things a little more clear.

Thank you for articulating git branch's behavior - all is clear as mud now :)

Tim
Previous: Linus TorvaldsNext: Tim Harper
Message 3 of 58 in “Bizarre missing changes (git bug?)”
  1. Tim HarperJul 21, 2008
  2. Linus TorvaldsJul 21, 2008
  3. Tim HarperJul 21, 2008
  4. Tim HarperJul 21, 2008
  5. Roman ZippelJul 26, 2008
  6. Linus TorvaldsJul 26, 2008
  7. Roman ZippelJul 27, 2008
  8. Linus TorvaldsJul 27, 2008
  9. Roman ZippelJul 27, 2008
  10. Linus TorvaldsJul 27, 2008
  11. Roman ZippelJul 28, 2008
  12. Linus TorvaldsJul 28, 2008
  13. Linus TorvaldsJul 28, 2008
  14. Roman ZippelJul 29, 2008
  15. Martin LanghoffJul 29, 2008
  16. Roman ZippelJul 30, 2008
  17. Martin LanghoffJul 30, 2008
  18. Linus TorvaldsJul 30, 2008
  19. Linus TorvaldsJul 30, 2008
  20. Junio C HamanoJul 30, 2008
  21. Junio C HamanoJul 31, 2008
  22. Linus TorvaldsJul 31, 2008
  23. revision traversal: show full history with merge simplificationJunio C Hamano, Jul 31, 2008
  24. Junio C HamanoJul 31, 2008
  25. Linus TorvaldsJul 31, 2008
  26. revision traversal: show full history with merge simplificationJunio C Hamano, Jul 31, 2008
  27. Linus TorvaldsJul 31, 2008
  28. Junio C HamanoJul 31, 2008
  29. Junio C HamanoAug 1, 2008
  30. Linus TorvaldsAug 1, 2008
  31. Junio C HamanoAug 1, 2008
  32. Jakub NarebskiJul 30, 2008
  33. Linus TorvaldsJul 29, 2008
  34. Linus TorvaldsJul 29, 2008
  35. Roman ZippelJul 29, 2008
  36. David KastrupJul 29, 2008
  37. Linus TorvaldsJul 29, 2008
  38. Roman ZippelJul 30, 2008
  39. Kevin BallardJul 30, 2008
  40. Linus TorvaldsJul 30, 2008
  41. Jeff KingJul 29, 2008
  42. Roman ZippelJul 29, 2008
  43. Olivier GalibertJul 29, 2008
  44. Jeff KingJul 29, 2008
  45. Linus TorvaldsJul 29, 2008
  46. Roman ZippelJul 30, 2008
  47. Linus TorvaldsJul 30, 2008
  48. Jeff KingJul 30, 2008
  49. Linus TorvaldsJul 30, 2008
  50. Roman ZippelJul 30, 2008
  51. Kevin BallardJul 30, 2008
  52. Linus TorvaldsJul 30, 2008
  53. Linus TorvaldsJul 30, 2008
  54. Jeff KingJul 30, 2008
  55. Martin LanghoffJul 27, 2008
  56. Roman ZippelJul 28, 2008
  57. Alex RiesenJul 21, 2008
  58. Linus TorvaldsJul 21, 2008

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.