提交 00931549 编写于 作者: M Martin Langhoff 提交者: Junio C Hamano

annotate: fix -S parameter to take a string

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: NMartin Langhoff <martin@catalyst.net.nz>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 7c3ecb65
......@@ -31,7 +31,7 @@ ()
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: $!";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册