Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
annotate: fix -S parameter to take a string
author
Martin Langhoff
<martin@catalyst.net.nz>
Thu, 2 Mar 2006 04:24:30 +0000
(17:24 +1300)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 2 Mar 2006 05:33:27 +0000
(21:33 -0800)
In the conversion to Getopt::Long, the -S / --rev-list parameter stopped
working. We need to tell Getopt::Long that it is a string.
As a bonus, the open() now does some useful error handling.
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-annotate.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
7c3ecb6
)
diff --git
a/git-annotate.perl
b/git-annotate.perl
index d6028c93cadd0a7c0138ab6c0edf2b02055a4d48..cd476c76297daa9ce99718b429835debd2d76ed1 100755
(executable)
--- a/
git-annotate.perl
+++ b/
git-annotate.perl
@@
-31,7
+31,7
@@
()
my $rc = GetOptions( "long|l" => \$longrev,
"help|h" => \$help,
"rename|r" => \$rename,
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();
}
if (!$rc or $help) {
usage();
}
@@
-174,7
+174,8
@@
sub git_rev_list {
my $revlist;
if ($rev_file) {
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: $!";
} else {
$revlist = open_pipe("git-rev-list","--parents","--remove-empty",$rev,"--",$file)
or die "Failed to exec git-rev-list: $!";