Small issue with rerere when one file fails to automatically merge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I recently got this issue with rerere, that can be reproduced with the
workflow below. The problem is that rerere does its job, but fails
to mark the files as being merged when one of the files auto merging
failed.

I haven't taken the time to look into rerere to fix this, though.

$ git init
Initialized empty Git repository in /tmp/test/.git/
[master]$ git config rerere.enabled true
[master]$ echo a > a
[master]$ echo b > b
[master]$ git add a b
[master]$ git commit -m 1
Created initial commit fb0ebe4: 1
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 a
 create mode 100644 b
[master]$ git branch foo
[master]$ git branch foo2
[master]$ echo aa > a
[master]$ echo bb > b
[master]$ git commit -a -m 2
Created commit 69f9bf3: 2
 2 files changed, 2 insertions(+), 2 deletions(-)
[master]$ git co foo
Switched to branch "foo"
[foo]$ echo ab > a
[foo]$ echo bc > b
[foo]$ git commit -a -m 3
Created commit 991c054: 3
 2 files changed, 2 insertions(+), 2 deletions(-)
[foo]$ git merge master
Auto-merging a
CONFLICT (content): Merge conflict in a
Auto-merging b
CONFLICT (content): Merge conflict in b
Recorded preimage for 'a'
Recorded preimage for 'b'
Automatic merge failed; fix conflicts and then commit the result.
[foo]$ echo aab > a
[foo]$ echo bbc > b
[foo]$ GIT_EDITOR=cat git commit -a
<snip>
Recorded resolution for 'a'.
Recorded resolution for 'b'.
Created commit 98c88e2: Merge branch 'master' into foo
[foo]$ git co foo2
Switched to branch "foo2"
[foo2]$ echo ab > a
[foo2]$ echo bd > b
[foo2]$ git commit -a -m 4
Created commit 9c65461: 4
 2 files changed, 2 insertions(+), 2 deletions(-)
[foo2]$ git merge master
Auto-merging a
CONFLICT (content): Merge conflict in a
Auto-merging b
CONFLICT (content): Merge conflict in b
Recorded preimage for 'b'
Resolved 'a' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
[foo2]$ git status
a: needs merge
b: needs merge
# On branch foo2
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#       unmerged:   a
#       unmerged:   b
#
no changes added to commit (use "git add" and/or "git commit -a")
[foo2]$ cat a
aab
[foo2]$ cat b
<<<<<<< HEAD:b
bd
=======
bb
>>>>>>> master:b

One would expect a not to be unmerged.

Mike
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux