Git development
 help / color / mirror / Atom feed
* Probably a GIT bug..
@ 2008-04-22 14:43 Tomasz bla Fortuna
  2008-04-23 16:47 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Tomasz bla Fortuna @ 2008-04-22 14:43 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1989 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-23 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-22 14:43 Probably a GIT bug Tomasz bla Fortuna
2008-04-23 16:47 ` Junio C Hamano
2008-04-23 17:10   ` Daniel Barkalow
2008-04-23 17:13   ` Dmitry Potapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox