Probably a GIT bug..
- From
- Tomasz bla Fortuna <bla@thera.be>
- Date
- Apr 22, 2008, 14:43 UTC
- Message-ID
- <20080422164311.67c3d02b@Vorago>
Hello,
Testcase: http://temp.thera.be/gitbug.tar Contents: gitbug/ gitbug/prep.sh gitbug/fail.sh gitbug/init.sh gitbug/README
#v+ init.sh
#!/bin/bash
export GIT_AUTHOR_EMAIL='test@test.be' export GIT_AUTHOR_NAME='gitbug' export GIT_AUTHOR_DATE="Mon Apr 21 16:40:08 2008 +0200" export GIT_COMMITTER_NAME='gitbug' export GIT_COMMITTER_EMAIL='test@test.be' export GIT_COMMITTER_DATE="Mon Apr 21 16:40:08 2008 +0200"
rm -rf ./.git rm -f test test2
git init touch test git add test git commit -a -m "first commit"
## prep.sh: #!/bin/bash mkdir .git/objects/a2 chmod a-rwx .git/objects/a2
## fail.sh: #!/bin/bash
touch test2 git add test2 git commit -a -m "second commit"
echo -en "\n\n\nSee the result of git-fsck:\n" git-fsck
#v-
Execution: #v+ [16:39:14] bla@Vorago ~/my_tmp/gitbug $ source init.sh Initialized empty Git repository in .git/ Created initial commit 2231f53: first commit 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 test [16:39:16] bla@Vorago ~/my_tmp/gitbug $ source prep.sh [16:39:17] bla@Vorago ~/my_tmp/gitbug $ source fail.sh error: sha1 file /home/bla/my_tmp/gitbug/.git/objects/a2/2c62298732a162ab9aa64c31b24c4c87cf8cd9: Permission denied
fatal: unable to read destination tree (a12d0088c0e538480a1586a9ac2d5de3b54b2759) Created commit
See the result of git-fsck:
broken link from commit a12d0088c0e538480a1586a9ac2d5de3b54b2759
to tree a22c62298732a162ab9aa64c31b24c4c87cf8cd9
missing tree a22c62298732a162ab9aa64c31b24c4c87cf8cd9
[16:39:19] bla@Vorago ~/my_tmp/gitbug $
#v-As I understand such behaviour shouldn't have place; one can fix it by fixing attributes and then doing git-reset+commit. Maybe with fsck also.
I guess that GIT should check if he can create a tree link before creating a commit.
See you,
-- Tomasz bla Fortuna jid: bla(at)af.gliwice.pl pgp: 0x90746E79 @ pgp.mit.edu www: http://bla.thera.be