I've created a minimum testcase.
To reproduce the bug is: 1) create test git repository (attached gzip contains this)
inada-n@koala:~/test$ mkdir foo inada-n@koala:~/test$ cd foo/ /home/inada-n/test/foo inada-n@koala:~/test/foo$ git init Initialized empty Git repository in /home/inada-n/test/foo/.git/ inada-n@koala:~/test/foo$ ln -s . foo inada-n@koala:~/test/foo$ git add foo inada-n@koala:~/test/foo$ git commit -m "add foo" [master (root-commit) ca3de8b] add foo 1 files changed, 1 insertions(+), 0 deletions(-) create mode 120000 foo inada-n@koala:~/test/foo$ cat .git/refs/heads/master ca3de8bc2a701da35d7ff26d2a4b2dfeeec9e048 inada-n@koala:~/test/foo$ git ls-tree ca3de8bc2a701da35d7ff26d2a4b2dfeeec9e048 120000 blob 945c9b46d684f08ec84cb316e1dc0061e361f794 foo inada-n@koala:~/test/foo$ git ls-tree ca3de8bc2a701da35d7ff26d2a4b2dfeeec9e048 > tree inada-n@koala:~/test/foo$ vim tree #edit tree file inada-n@koala:~/test/foo$ git mktree < tree c7b0af5a3a158d8eeb88d3d333ad076895dd54d0 inada-n@koala:~/test/foo$ git ls-tree c7b0af5a3a158d8eeb88d3d333ad076895dd54d0 120777 blob 945c9b46d684f08ec84cb316e1dc0061e361f794 foo inada-n@koala:~/test/foo$ echo "change mode" | git commit-tree c7b0af5a3a158d8eeb88d3d333ad076895dd54d0 -p ca3de8bc2a701da35d7ff26d2a4b2dfeeec9e048 912fbbb93aa51215867875fcff126885718ffcdf inada-n@koala:~/test/foo$ echo "change mode take2" | git commit-tree c7b0af5a3a158d8eeb88d3d333ad076895dd54d0 -p 912fbbb93aa51215867875fcff126885718ffcdf 7b413dc8152fd1a35ce1552456af2ea884268c8f inada-n@koala:~/test/foo$ echo 7b413dc8152fd1a35ce1552456af2ea884268c8f > .git/refs/heads/master inada-n@koala:~/test/foo$ git log commit 7b413dc8152fd1a35ce1552456af2ea884268c8f Author: Naoki INADA <email address hidden> Date: Tue Feb 2 09:28:42 2010 +0900
change mode take2
commit 912fbbb93aa51215867875fcff126885718ffcdf Author: Naoki INADA <email address hidden> Date: Tue Feb 2 09:28:15 2010 +0900
change mode
commit ca3de8bc2a701da35d7ff26d2a4b2dfeeec9e048 Author: Naoki INADA <email address hidden> Date: Tue Feb 2 09:26:05 2010 +0900
add foo
2)Make empty git repository and run git daemon. $ cd .. $ mkdir baz $ cd baz $ git init $ cd .. $ $ git daemon --export-all --enable=upload-pack --enable=receive-pack --base-path=$HOME/test
3) branch with bzr-git inada-n@koala:~/test$ bzr branch git://localhost/foo/ bar / Counting objects: 6, done. Branched 3 revision(s). inada-n@koala:~/test$ cd bar /home/inada-n/test/bar inada-n@koala:~/test/bar$ rm .bzr/repository/git.db inada-n@koala:~/test/bar$ bzr dpush git://localhost/baz/ bzr: ERROR: exceptions.AssertionError: recreated git commit had different sha1: expected 7b413dc8152fd1a35ce1552456af2ea884268c8f, got 368b0bb7ff8782ced333c386d874594614cb5913
I've created a minimum testcase.
To reproduce the bug is:
1) create test git repository (attached gzip contains this)
inada-n@ koala:~ /test$ mkdir foo koala:~ /test$ cd foo/ n/test/ foo koala:~ /test/foo$ git init n/test/ foo/.git/ koala:~ /test/foo$ ln -s . foo koala:~ /test/foo$ git add foo koala:~ /test/foo$ git commit -m "add foo" koala:~ /test/foo$ cat .git/refs/ heads/master 35d7ff26d2a4b2d feeec9e048 koala:~ /test/foo$ git ls-tree ca3de8bc2a701da 35d7ff26d2a4b2d feeec9e048 ec84cb316e1dc00 61e361f794 foo koala:~ /test/foo$ git ls-tree ca3de8bc2a701da 35d7ff26d2a4b2d feeec9e048 > tree koala:~ /test/foo$ vim tree #edit tree file koala:~ /test/foo$ git mktree < tree eeb88d3d333ad07 6895dd54d0 koala:~ /test/foo$ git ls-tree c7b0af5a3a158d8 eeb88d3d333ad07 6895dd54d0 ec84cb316e1dc00 61e361f794 foo koala:~ /test/foo$ echo "change mode" | git commit-tree c7b0af5a3a158d8 eeb88d3d333ad07 6895dd54d0 -p ca3de8bc2a701da 35d7ff26d2a4b2d feeec9e048 5867875fcff1268 85718ffcdf koala:~ /test/foo$ echo "change mode take2" | git commit-tree c7b0af5a3a158d8 eeb88d3d333ad07 6895dd54d0 -p 912fbbb93aa5121 5867875fcff1268 85718ffcdf 35ce1552456af2e a884268c8f koala:~ /test/foo$ echo 7b413dc8152fd1a 35ce1552456af2e a884268c8f > .git/refs/ heads/master koala:~ /test/foo$ git log 35ce1552456af2e a884268c8f
inada-n@
/home/inada-
inada-n@
Initialized empty Git repository in /home/inada-
inada-n@
inada-n@
inada-n@
[master (root-commit) ca3de8b] add foo
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 120000 foo
inada-n@
ca3de8bc2a701da
inada-n@
120000 blob 945c9b46d684f08
inada-n@
inada-n@
inada-n@
c7b0af5a3a158d8
inada-n@
120777 blob 945c9b46d684f08
inada-n@
912fbbb93aa5121
inada-n@
7b413dc8152fd1a
inada-n@
inada-n@
commit 7b413dc8152fd1a
Author: Naoki INADA <email address hidden>
Date: Tue Feb 2 09:28:42 2010 +0900
change mode take2
commit 912fbbb93aa5121 5867875fcff1268 85718ffcdf
Author: Naoki INADA <email address hidden>
Date: Tue Feb 2 09:28:15 2010 +0900
change mode
commit ca3de8bc2a701da 35d7ff26d2a4b2d feeec9e048
Author: Naoki INADA <email address hidden>
Date: Tue Feb 2 09:26:05 2010 +0900
add foo
2)Make empty git repository and run git daemon. upload- pack --enable= receive- pack --base- path=$HOME/ test
$ cd ..
$ mkdir baz
$ cd baz
$ git init
$ cd ..
$ $ git daemon --export-all --enable=
3) branch with bzr-git koala:~ /test$ bzr branch git://localhost /foo/ bar koala:~ /test$ cd bar n/test/ bar koala:~ /test/bar$ rm .bzr/repository /git.db koala:~ /test/bar$ bzr dpush git://localhost /baz/ AssertionError: recreated git commit had different sha1: expected 7b413dc8152fd1a 35ce1552456af2e a884268c8f, got 368b0bb7ff8782c ed333c386d87459 4614cb5913
inada-n@
/ Counting objects: 6, done.
Branched 3 revision(s).
inada-n@
/home/inada-
inada-n@
inada-n@
bzr: ERROR: exceptions.