Skip to contentSkip to conversation

Possible git bug

PATCH Damon LaCrosse 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

HiQ,

any chances the attached patch reveals a git bug?

Cheers,

git-bug.sh +24 -0
diff -Nru old/git-bug.sh new/git-bug.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+mkdir bug
+cd bug
+git init-db
+
+echo one > file1
+git add file1
+echo "Bug Test Example" | git commit --all -F -
+
+git checkout -b branch
+echo two >> file1
+echo "Branch modification" | git commit --all -F -
+
+git checkout master
+git mv file1 file2
+
+echo "Master rename" | git commit --all -F -
+
+echo three >> file2
+
+echo "Master modification" | git commit --all -F -
+
+git merge -s recursive branch
#1 lore raw

Hi,

Quoted 1 line · Damon LaCrosse

any chances the attached patch reveals a git bug?

You mean that it produces a merge conflict when a file was modified in one branch, and deleted in the other?

Because that's what you did, basically. You did not rename file1 to file2. You completely changed the contents. I mean, completely.

Ciao,
Dscho