From: Pavel Roskin <proski@gnu•org>
To: git <git@vger•kernel.org>
Subject: commit-id fails after cg-init
Date: Tue, 03 May 2005 16:03:05 -0400 [thread overview]
Message-ID: <1115150585.28520.11.camel@dv> (raw)
Hello!
I tried to start a new project using cogito (current snapshot) and I was
immediately greeted by a bug (or a buglet if you want). Let's do this
in a clean directory:
$ cg-init
defaulting to local storage area
$ cg-diff
cat: .git/refs/tags/: Is a directory
cat: .git/refs/heads/: Is a directory
Invalid id:
usage: git-cat-file [-t | tagname] <sha1>
usage: git-cat-file [-t | tagname] <sha1>
Invalid id:
usage: diff-cache [-r] [-z] [-p] [--cached] <tree sha1>
mkdir: cannot create directory `/tmp/gitdiff.k4FHLY/': File exists
$
Not nice. Trivial debugging shows that it's commit-id that fails:
$ sh -x commit-id
+ SHA1='[A-Za-z0-9]{40}'
+ SHA1ONLY='^[A-Za-z0-9]{40}$'
+ id=
+ '[' '!' '' ']'
++ cat .git/HEAD
+ id=
+ echo
+ egrep -vq '^[A-Za-z0-9]{40}$'
+ '[' -r .git/refs/tags/ ']'
++ cat .git/refs/tags/
cat: .git/refs/tags/: Is a directory
...
$ ls -al .git/HEAD
lrwxrwxrwx 1 proski proski 17 2005-05-03 15:50 .git/HEAD -> refs/heads/master
$ cat .git/refs/heads/master
$
So, cg-init created an empty .git/refs/heads/master and made .git/HEAD a
symlink to it. Now, commit-id reads that file and gets confused.
If anybody has an idea what to put to .git/refs/heads/master please
speak up so that cg-init could be fixed.
--
Regards,
Pavel Roskin
next reply other threads:[~2005-05-03 19:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-03 20:03 Pavel Roskin [this message]
2005-05-03 21:13 ` commit-id fails after cg-init Petr Baudis
2005-05-04 15:14 ` David A. Wheeler
2005-05-04 15:45 ` H. Peter Anvin
2005-05-05 7:22 ` Alexey Nezhdanov
2005-05-06 3:06 ` David A. Wheeler
2005-05-03 21:14 ` Joel Becker
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=1115150585.28520.11.camel@dv \
--to=proski@gnu$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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