diff options
author | Junio C Hamano <junkio@cox.net> | 2006-03-01 22:08:12 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-03-01 22:08:12 -0800 |
commit | b485db9896654b11c8a7bf64fd5cc3d0d8dc5b69 (patch) | |
tree | 4b6a563b4e3dd22a1e5257bdcffac399370b096b /git-annotate.perl | |
parent | 09a278e6b906d3902f3b75ec183a06b0c029d27b (diff) | |
parent | 38fd0721d0a2a1a723bc28fc0817e3571987b1ef (diff) | |
download | git-b485db9896654b11c8a7bf64fd5cc3d0d8dc5b69.tar.gz |
Merge branch 'np/delta' into next
* np/delta:
diff-delta: allow reusing of the reference buffer index
diff-delta: bound hash list length to avoid O(m*n) behavior
diff-delta: produce optimal pack data
Merge branch 'kh/svnimport'
Merge branch 'js/refs'
annotate: fix -S parameter to take a string
annotate: Add a basic set of test cases.
annotate: handle \No newline at end of file.
gitview: Use horizontal scroll bar in the tree view
Diffstat (limited to 'git-annotate.perl')
-rwxr-xr-x | git-annotate.perl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/git-annotate.perl b/git-annotate.perl index f9c2c6caf5..cd476c7629 100755 --- a/git-annotate.perl +++ b/git-annotate.perl @@ -31,7 +31,7 @@ our ($help, $longrev, $rename, $starting_rev, $rev_file) = (0, 0, 1); my $rc = GetOptions( "long|l" => \$longrev, "help|h" => \$help, "rename|r" => \$rename, - "rev-file|S" => \$rev_file); + "rev-file|S=s" => \$rev_file); if (!$rc or $help) { usage(); } @@ -174,7 +174,8 @@ sub git_rev_list { my $revlist; if ($rev_file) { - open($revlist, '<' . $rev_file); + open($revlist, '<' . $rev_file) + or die "Failed to open $rev_file : $!"; } else { $revlist = open_pipe("git-rev-list","--parents","--remove-empty",$rev,"--",$file) or die "Failed to exec git-rev-list: $!"; @@ -304,6 +305,12 @@ sub _git_diff_parse { } $ri++; + } elsif (m/^\\/) { + ; + # Skip \No newline at end of file. + # But this can be internationalized, so only look + # for an initial \ + } else { if (substr($_,1) ne get_line($slines,$ri) ) { die sprintf("Line %d (%d) does not match:\n|%s\n|%s\n%s => %s\n", |