From: Martin Langhoff <martin@catalyst.net.nz>
To: git@vger.kernel.org, junkio@cox.net
Cc: Martin Langhoff <martin@catalyst.net.nz>
Subject: [PATCH] annotate: fix -S parameter to take a string
Date: Thu, 2 Mar 2006 17:24:30 +1300 [thread overview]
Message-ID: <11412734703272-git-send-email-martin@catalyst.net.nz> (raw)
In-Reply-To:
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>
---
Or pull from my cvsserver branch.
---
git-annotate.perl | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
5a44938cf5b79dd5d056075509f12b8e9a13e941
diff --git a/git-annotate.perl b/git-annotate.perl
index f9c2c6c..31318d3 100755
--- a/git-annotate.perl
+++ b/git-annotate.perl
@@ -31,7 +31,7 @@ our ($help, $longrev, $rename, $starting
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: $!";
--
1.2.4.g09a27-dirty
reply other threads:[~2006-03-02 4:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11412734703272-git-send-email-martin@catalyst.net.nz \
--to=martin@catalyst.net.nz \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).