{"thread":{"id":"15680","subject":"Small issue with rerere when one file fails to automatically merge","startedAt":"2008-09-26T05:55:52Z","lastAt":"2008-09-26T05:55:52Z","messageCount":1,"participants":["Mike Hommey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"91657","messageId":"20080926055552.GA31063@glandium.org","threadId":"15680","inReplyTo":null,"subject":"Small issue with rerere when one file fails to automatically merge","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-09-26T05:55:52Z","receivedAt":"2008-09-26T05:55:52Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"Hi,\n\nI recently got this issue with rerere, that can be reproduced with the\nworkflow below. The problem is that rerere does its job, but fails\nto mark the files as being merged when one of the files auto merging\nfailed.\n\nI haven't taken the time to look into rerere to fix this, though.\n\n$ git init\nInitialized empty Git repository in /tmp/test/.git/\n[master]$ git config rerere.enabled true\n[master]$ echo a > a\n[master]$ echo b > b\n[master]$ git add a b\n[master]$ git commit -m 1\nCreated initial commit fb0ebe4: 1\n 2 files changed, 2 insertions(+), 0 deletions(-)\n create mode 100644 a\n create mode 100644 b\n[master]$ git branch foo\n[master]$ git branch foo2\n[master]$ echo aa > a\n[master]$ echo bb > b\n[master]$ git commit -a -m 2\nCreated commit 69f9bf3: 2\n 2 files changed, 2 insertions(+), 2 deletions(-)\n[master]$ git co foo\nSwitched to branch \"foo\"\n[foo]$ echo ab > a\n[foo]$ echo bc > b\n[foo]$ git commit -a -m 3\nCreated commit 991c054: 3\n 2 files changed, 2 insertions(+), 2 deletions(-)\n[foo]$ git merge master\nAuto-merging a\nCONFLICT (content): Merge conflict in a\nAuto-merging b\nCONFLICT (content): Merge conflict in b\nRecorded preimage for 'a'\nRecorded preimage for 'b'\nAutomatic merge failed; fix conflicts and then commit the result.\n[foo]$ echo aab > a\n[foo]$ echo bbc > b\n[foo]$ GIT_EDITOR=cat git commit -a\n<snip>\nRecorded resolution for 'a'.\nRecorded resolution for 'b'.\nCreated commit 98c88e2: Merge branch 'master' into foo\n[foo]$ git co foo2\nSwitched to branch \"foo2\"\n[foo2]$ echo ab > a\n[foo2]$ echo bd > b\n[foo2]$ git commit -a -m 4\nCreated commit 9c65461: 4\n 2 files changed, 2 insertions(+), 2 deletions(-)\n[foo2]$ git merge master\nAuto-merging a\nCONFLICT (content): Merge conflict in a\nAuto-merging b\nCONFLICT (content): Merge conflict in b\nRecorded preimage for 'b'\nResolved 'a' using previous resolution.\nAutomatic merge failed; fix conflicts and then commit the result.\n[foo2]$ git status\na: needs merge\nb: needs merge\n# On branch foo2\n# Changed but not updated:\n#   (use \"git add <file>...\" to update what will be committed)\n#\n#       unmerged:   a\n#       unmerged:   b\n#\nno changes added to commit (use \"git add\" and/or \"git commit -a\")\n[foo2]$ cat a\naab\n[foo2]$ cat b\n<<<<<<< HEAD:b\nbd\n=======\nbb\n>>>>>>> master:b\n\nOne would expect a not to be unmerged.\n\nMike\n"}]}