{"thread":{"id":"3511","subject":"[PATCH] annotate: fix -S parameter to take a string","startedAt":"2006-03-02T04:24:30Z","lastAt":"2006-03-02T04:24:30Z","messageCount":1,"participants":["Martin Langhoff"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"17009","messageId":"11412734703272-git-send-email-martin@catalyst.net.nz","threadId":"3511","inReplyTo":null,"subject":"[PATCH] annotate: fix -S parameter to take a string","fromName":"Martin Langhoff","fromEmail":"martin@catalyst.net.nz","sentAt":"2006-03-02T04:24:30Z","receivedAt":"2006-03-02T04:24:30Z","isPatch":true,"sender":{"key":"martin@laptop.org","avatar":null},"body":"In the conversion to Getopt::Long, the -S / --rev-list parameter stopped\nworking. We need to tell Getopt::Long that it is a string.\n\nAs a bonus, the open() now does some useful error handling.\n\nSigned-off-by: Martin Langhoff <martin@catalyst.net.nz>\n\n---\n\nOr pull from my cvsserver branch.\n\n---\n\n git-annotate.perl |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\n5a44938cf5b79dd5d056075509f12b8e9a13e941\ndiff --git a/git-annotate.perl b/git-annotate.perl\nindex f9c2c6c..31318d3 100755\n--- a/git-annotate.perl\n+++ b/git-annotate.perl\n@@ -31,7 +31,7 @@ our ($help, $longrev, $rename, $starting\n my $rc = GetOptions(\t\"long|l\" => \\$longrev,\n \t\t\t\"help|h\" => \\$help,\n \t\t\t\"rename|r\" => \\$rename,\n-\t\t\t\"rev-file|S\" => \\$rev_file);\n+\t\t\t\"rev-file|S=s\" => \\$rev_file);\n if (!$rc or $help) {\n \tusage();\n }\n@@ -174,7 +174,8 @@ sub git_rev_list {\n \n \tmy $revlist;\n \tif ($rev_file) {\n-\t\topen($revlist, '<' . $rev_file);\n+\t\topen($revlist, '<' . $rev_file)\n+\t\t    or die \"Failed to open $rev_file : $!\";\n \t} else {\n \t\t$revlist = open_pipe(\"git-rev-list\",\"--parents\",\"--remove-empty\",$rev,\"--\",$file)\n \t\t\tor die \"Failed to exec git-rev-list: $!\";\n-- \n1.2.4.g09a27-dirty\n"}]}