Re: How to find and analyze bad merges?
- From
- Norbert 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