summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e1ba4c3)
raw | patch | inline | side by side (parent: e1ba4c3)
author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Wed, 29 Sep 2010 07:26:23 +0000 (09:26 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 29 Sep 2010 20:25:17 +0000 (13:25 -0700) |
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>
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>
diff.c | patch | blob | history |
index 9a5c77c13ff3406a85e8a94f309a639529f2d88b..0e2e872e0bb6b82d08e4dc6415afe875ccccc367 100644 (file)
--- a/diff.c
+++ b/diff.c
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