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

Re: How to find and analyze bad merges?

From
NNNorbert Nemec <norbert.nemec@native-instruments.de>
Date
Feb 2, 2012, 11:17 UTC
Message-ID
<4F2A70DA.6020107@native-instruments.de>
In-Reply-To
<87haz97c2k.fsf@thomas.inf.ethz.ch>
To be yet more precise:

My complaint is that you need this kind of sledge-hammer solutions to analyze the situation. I, as an semi-expert with git did manage to find the problem without even having to resort to bisect or manually redoing the merge. My complaint is about the perspective of the medium-experienced user who is completely puzzled by the fact that a "git log <filename>" silently skips the critical merge commit.

Am 02.02.12 11:40, schrieb Thomas Rast:
Show 39 quoted lines
> "norbert.nemec"<norbert.nemec@native-instruments.de>  writes:
>
>> Thinking about a possible solution:
>>
>> Is there a way to re-do a merge-commit and diff the result against the
>> recorded merge without touching the working tree? This would be the
>> killer-feature to analyze a recorded merge-commit.
>
>    git checkout M^
>    git merge M^2
>    git diff M HEAD
>
> You'd have to resolve conflicts though.  If you want to skip that, I
> think you could still see some information if you said
>
>    git reset
>    git diff M
>
> to see the differences between the (unmerged, with conflict hunks) state
> in the worktree and M.
>
> (Remember to re-attach your HEAD after playing around like this.)
>
>> Am 02.02.12 09:16, schrieb Junio C Hamano:
>>>
>>> Bisect?
>>
>> This is not the point: My colleague knew exactly which commit
>> contained the bugfix. The trouble was finding out why this bugfix
>> disappeared even though everything indicated that it was cleanly
>> merged into the current branch.
>
> But that makes it a prime candidate for bisect: you know the good commit
> (the original bugfix), and you know that the newest version is bad.
> Bonus points if you have an automated test for it, in which case bisect
> can nail the offender while you get coffee.
>
> Or am I missing something?
>
-- 
Dr. Norbert Nemec
Teamleader Software Development

Tel +49-30-611035-1882
norbert.nemec@native-instruments.de

KOMPLETE 8 ULTIMATE - the premium NI producer collection
=>  http://www.native-instruments.com/komplete8

TRAKTOR KONTROL S2 - the professional 2.1 DJ system
=>  http://www.native-instruments.com/s2

->>>>>> NATIVE INSTRUMENTS - The Future of Sound <<<<<<-

Registergericht: Amtsgericht Charlottenburg
Registernummer: HRB 72458
UST.-ID.-Nr. DE 20 374 7747

Geschäftsführung: Daniel Haver (CEO), Mate Galic
Previous: norbert.nemecNext: David Barr
Message 6 of 11 in “How to find and analyze bad merges?”
  1. norbert.nemecFeb 2, 2012
  2. Junio C HamanoFeb 2, 2012
  3. norbert.nemecFeb 2, 2012
  4. Junio C HamanoFeb 2, 2012
  5. norbert.nemecFeb 2, 2012
  6. Norbert NemecFeb 2, 2012
  7. David BarrFeb 2, 2012
  8. Jonathan NiederFeb 2, 2012
  9. norbert.nemecFeb 2, 2012
  10. Neal GroothuisFeb 2, 2012
  11. norbert.nemecFeb 2, 2012

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.