git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* commit-id fails after cg-init
@ 2005-05-03 20:03 Pavel Roskin
  2005-05-03 21:13 ` Petr Baudis
  2005-05-03 21:14 ` Joel Becker
  0 siblings, 2 replies; 7+ messages in thread
From: Pavel Roskin @ 2005-05-03 20:03 UTC (permalink / raw)
  To: git

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


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

end of thread, other threads:[~2005-05-06  2:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-03 20:03 commit-id fails after cg-init Pavel Roskin
2005-05-03 21:13 ` 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

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).