threads / bug / 17225

Possible git bug

Subject: Possible git bug

## tl;dr

2 messages between Jan 17, 2009 and Jan 17, 2009.

replies: 1people: 2as markdown or json

Damon LaCrosse· Jan 17, 2009, 13:52 UTC · lore
HiQ,
any chances the attached patch reveals a git bug?
Cheers,

diff -Nru old/git-bug.sh new/git-bug.sh --- old/git-bug.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/git-bug.sh 2008-09-16 09:52:18.000000000 +0200

@@ -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
Johannes Schindelin· Jan 17, 2009, 15:16 UTC · re: Damon LaCrosse · lore

Re: Possible git bug

Hi,
On Sat, 17 Jan 2009, Damon LaCrosse wrote:
> 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

← back to recent threads