summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bd494fc)
raw | patch | inline | side by side (parent: bd494fc)
author | Ryan Anderson <ryan@michonline.com> | |
Mon, 6 Mar 2006 02:43:53 +0000 (21:43 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 6 Mar 2006 06:01:28 +0000 (22:01 -0800) |
This is a bug fix, and cleans up one or two other things spotted during the
course of tracking down the main bug here.
[jc: the part that updates test-suite is split out to the next
one. Also I dropped "use Data::Dumper;" which seemed leftover
from debugging session.]
Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
course of tracking down the main bug here.
[jc: the part that updates test-suite is split out to the next
one. Also I dropped "use Data::Dumper;" which seemed leftover
from debugging session.]
Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-annotate.perl | patch | blob | history |
diff --git a/git-annotate.perl b/git-annotate.perl
index b113def97bd41c18f3d6e24c9952c50dbb8e2ad8..feea0a2d81c1d4841fe46d230a0ebfe87a4f82f2 100755 (executable)
--- a/git-annotate.perl
+++ b/git-annotate.perl
}
}
push @revqueue, $head;
-init_claim( defined $starting_rev ? $starting_rev : 'dirty');
+init_claim( defined $starting_rev ? $head : 'dirty');
unless (defined $starting_rev) {
my $diff = open_pipe("git","diff","-R", "HEAD", "--",$filename)
or die "Failed to call git diff to check for dirty state: $!";
return () unless defined $rev && defined $filename;
my $blob = git_ls_tree($rev, $filename);
+ die "Failed to find a blob for $filename in rev $rev\n" if !defined $blob;
my $catfile = open_pipe("git","cat-file", "blob", $blob)
or die "Failed to git-cat-file blob $blob (rev $rev, file $filename): " . $!;
my ($mode, $type, $blob, $tfilename);
while(<$lstree>) {
+ chomp;
($mode, $type, $blob, $tfilename) = split(/\s+/, $_, 4);
last if ($tfilename eq $filename);
}
close($lstree);
- return $blob if $filename eq $filename;
+ return $blob if ($tfilename eq $filename);
die "git-ls-tree failed to find blob for $filename";
}