From: Jeff King Date: Wed, 28 Nov 2007 22:52:29 GMT Subject: Re: [PATCH 2/3] cvsimport: use show-ref to support packed refs Message-ID: <20071128225229.GA13836@coredump.intra.peff.net> In-Reply-To: <20071128224313.GB13298@coredump.intra.peff.net> On Wed, Nov 28, 2007 at 05:43:13PM -0500, Jeff King wrote: > > sub get_headref { > > my ($it) = (@_); > > my $r = `git-rev-parse --verify "refs/$it"`; > > return undef unless $? == 0; > > chomp $r; > > return $r; > > } > > I have no comment on which is the best command to use (you would know > much better than I), but adding "refs/" is wrong. BTW, one bad thing about the new get_headref compared to the original is that it does not distinguish very well between "ref does not exist" and "an error occurred." Is there a lookup command that makes such a distinction possible? -Peff