From: "norbert.nemec" <norbert.nemec@native-instruments.de>
To: git@vger.kernel.org
Subject: Re: How to find and analyze bad merges?
Date: Thu, 02 Feb 2012 11:05:34 +0100 [thread overview]
Message-ID: <jgdn5j$v4g$1@dough.gmane.org> (raw)
In-Reply-To: <jgdgcv$h8n$1@dough.gmane.org>
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.
Am 02.02.12 09:10, schrieb norbert.nemec:
> Hi there,
>
> a colleague of mine happened to produce a bad merge by unintenionally
> picking the version of the remote branch ("R") for all conflicting
> files. Effectively, he eliminated a whole bunch of bugfixes that were
> already on his local branch ("L").
>
> Obviously this was a mistake on his side, but hey: everyone makes
> mistakes. The real problem is to find this problem afterwards, possibly
> weeks later, when you suddenly realize that a bug that you had fixed
> suddenly reappears.
>
> A "git log" on the whole repository shows both branches R and L.
> A "git show" on the bugfix commit shows the bugfix as you expect it.
>
> BUT:
> A "git log" on the file itself shows neither the problematic merge nor
> the bugfix commit. Git considers the merge of this file trivial because
> the content is identical to that of parent R. Therefore, whatever
> happened on branch L is not considered relevant history of the file.
>
> FURTHERMORE:
> A "git show" of the merge itself does not show the conflicting file
> either. Obviously, "git show" on a merge decides which files are
> relevant not based on conflicts but based on resolutions.
>
> To sort out what happened, you first need to have a suspicion and then
> dig fairly deep in the manuals to set the correct options to show what
> happened.
>
> I think, both "git log" and "git show" should by default be a bit more
> conservative in hiding "insignificant" merges:
> * In "git log" a branch should only be hidden if it never touched the file.
> * In "git show" a merge should display all files that did have a
> conflict independent of the resolution. (I am open to discuss whether
> auto-resolvable conflicts should be displayed by default. Non-trivial
> conflicts definitely should)
>
> Greetings,
> Norbert
>
next prev parent reply other threads:[~2012-02-02 10:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 8:10 How to find and analyze bad merges? norbert.nemec
2012-02-02 8:16 ` Junio C Hamano
2012-02-02 9:01 ` norbert.nemec
2012-02-02 20:09 ` Junio C Hamano
2012-02-02 10:05 ` norbert.nemec [this message]
[not found] ` <87haz97c2k.fsf@thomas.inf.ethz.ch>
2012-02-02 11:17 ` Norbert Nemec
2012-02-02 11:41 ` David Barr
2012-02-02 12:03 ` Jonathan Nieder
2012-02-02 12:16 ` norbert.nemec
2012-02-02 15:09 ` Neal Groothuis
2012-02-02 12:10 ` norbert.nemec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jgdn5j$v4g$1@dough.gmane.org' \
--to=norbert.nemec@native-instruments.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.