git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz bla Fortuna <bla@thera.be>
To: git@vger.kernel.org
Subject: Probably a GIT bug..
Date: Tue, 22 Apr 2008 16:43:11 +0200	[thread overview]
Message-ID: <20080422164311.67c3d02b@Vorago> (raw)

[-- 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 --]

             reply	other threads:[~2008-04-22 15:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22 14:43 Tomasz bla Fortuna [this message]
2008-04-23 16:47 ` Probably a GIT bug Junio C Hamano
2008-04-23 17:10   ` Daniel Barkalow
2008-04-23 17:13   ` Dmitry Potapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080422164311.67c3d02b@Vorago \
    --to=bla@thera.be \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).