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 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html