Git development
 help / color / mirror / Atom feed
From: Chris Shoemaker <c.shoemaker@cox.net>
To: git@vger.kernel.org
Subject: git and gitweb inconsistencies
Date: Sat, 22 Oct 2005 20:14:12 -0400	[thread overview]
Message-ID: <20051023001412.GA22679@pe.Belkin> (raw)

I've been experimenting with git and gitweb, but I've reached deadend.
Maybe someone can help?


Short Version:

In sub git_get_type in gitweb.cgi, this line:
  open my $fd, "-|", "$gitbin/git-cat-file -t $hash" or return;

results in:
error: unable to find e71b869f3333ad10a492251e099ed9176248a420
fatal: git-cat-file e71b869f3333ad10a492251e099ed9176248a420: bad file

BUT, from the shell:
$ git-cat-file -t e71b869f3333ad10a492251e099ed9176248a420
commit


Longer explanation:

Initially I created the git repository using git-cvsimport as
described in the cvs-migration document.  I also installed gitweb.cgi
and everything seemed to be fine.  In particular the refs/heads/* files
referred to the tips of current branches in cvs.  I was quite pleased.

A few days later, I ran git-cvsimport again, with -i.  This imported
just the recent changes, but the view from gitweb didn't change.  :(

At first, I thought that the git-cvsimport hadn't worked.  But,
git-whatchanged clearly showed the new changes.  (I later learned that
git-rev-list also returned the tip-of-branch commits.)  After reading
gitweb.cgi, I realized that the refs/heads/* files had not been
changed, so they still referred to the tip-of-branch for the initial
import.  (I expected the refs/heads/* to point to the last commit on
each branch.  Was that wrong?)

Anyway, I tried to make a new head that actually pointed to what I
expected: 

$ echo `git-rev-list tip --max-count=1` > refs/heads/mytest
$ git-cat-file -t `cat refs/heads/mytest`
commit

No problem.  But, this same task doesn't seem to work from gitweb.cgi:

$ ./gitweb.cgi http://localhost/cgi-bin/gitweb.cgi?p=test\;a=heads > /dev/null
error: unable to find e71b869f3333ad10a492251e099ed9176248a420
fatal: git-cat-file e71b869f3333ad10a492251e099ed9176248a420: bad file

How can this be?  Have I messed something up, or am I just totally confused?

-chris

ps. please cc, not subscribed.

             reply	other threads:[~2005-10-23  0:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-23  0:14 Chris Shoemaker [this message]
2005-10-23 11:59 ` git and gitweb inconsistencies Sven Verdoolaege
2005-10-23 17:30   ` Chris Shoemaker
2005-10-23 18:28     ` Sven Verdoolaege

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=20051023001412.GA22679@pe.Belkin \
    --to=c.shoemaker@cox.net \
    --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