Fix the added to both but different conflict
authorCatalin Marinas <catalin.marinas@gmail.com>
Wed, 3 May 2006 19:34:18 +0000 (20:34 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Wed, 3 May 2006 19:34:18 +0000 (20:34 +0100)
By default, the index was left with two unmerged entries. StGIT tries to
leave the index clean after conflicts.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/gitmergeonefile.py

index c603ff8..c3aaa2a 100644 (file)
@@ -205,6 +205,8 @@ def merge(orig_hash, file1_hash, file2_hash,
                     return 1
             # files are different
             else:
+                # reset the index to the current file
+                os.system('git-update-index -- %s' % path)
                 print >> sys.stderr, \
                       'Error: File "%s" added in branches but different' % path
                 __conflict(path)