summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2010-09-29 09:26:23 +0200
committerJunio C Hamano <gitster@pobox.com>2010-09-29 13:25:17 -0700
commit9ec26eb7cd7767faffac9bac5e22ede0d25e20e3 (patch)
tree6a8005fbb5c36877ba2a8f10ddc6897005c98221 /diff.c
parente1ba4c32cbc48316d07f807bf32b9194601003b0 (diff)
downloadgit-9ec26eb7cd7767faffac9bac5e22ede0d25e20e3.tar.gz
diff: trivial fix for --output file error message
The option argument is either after the equal sign in --output=... or in the next command-line argument. optarg is the reliable way to access it. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 9a5c77c13f..0e2e872e0b 100644
--- a/diff.c
+++ b/diff.c
@@ -3310,7 +3310,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
else if ((argcount = parse_long_opt("output", av, &optarg))) {
options->file = fopen(optarg, "w");
if (!options->file)
- die_errno("Could not open '%s'", arg + strlen("--output="));
+ die_errno("Could not open '%s'", optarg);
options->close_file = 1;
return argcount;
} else