On Fri, Sep 26, 2008 at 03:03:12AM +0200, SZEDER Gábor <szeder@xxxxxxxxxx> wrote: > * FAIL 18: Hand committing of a redundant merge removes dups > > > git rev-parse second master >expect && > test_must_fail git merge second master && > git checkout master g && > EDITOR=: git commit -a && > git cat-file commit HEAD | sed -n -e "s/^parent //p" > -e "/^$/q" >actual && > test_cmp expect actual > > > > * failed 1 among 18 test(s) > make: *** [t7502-commit.sh] Error 1 OK, here is the scenario. The basic problemis that if it's git-commit that creates the merge commit and not git-merge, then git-commit does not "know" that git-merge was invoked using --no-ff. --no-ff means that if reduce_heads() removes a parent, that will be a problem, since the resulting commit will no longer be a merge commit. I think we can't avoid storing this info in a MERGE_MODE file, because we have to add HEAD to the list of parents in case --no-ff is used, but we should not do so in case it's reachable from existing heads and --no-ff is not used. I'll send a patch that does this in a bit.
Attachment:
pgp4D2a6EMj2U.pgp
Description: PGP signature