summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ea51d41)
raw | patch | inline | side by side (parent: ea51d41)
author | Linus Torvalds <torvalds@osdl.org> | |
Tue, 18 Oct 2005 07:16:45 +0000 (00:16 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 18 Oct 2005 07:16:45 +0000 (00:16 -0700) |
This fixes the default built-in exec() of "diff" to add a "--" before the
filenames, so that if a filename starts with a "-", the diff program won't
think it's an option.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
filenames, so that if a filename starts with a "-", the diff program won't
think it's an option.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff.c | patch | blob | history |
index 823c8d0aabe7d68a6dd0c4b3311ecff64710ea6e..306bcd9807803f37dd742ff5c479c4875c454e03 100644 (file)
--- a/diff.c
+++ b/diff.c
{
int i, next_at, cmd_size;
const char *const diff_cmd = "diff -L%s -L%s";
- const char *const diff_arg = "%s %s||:"; /* "||:" is to return 0 */
+ const char *const diff_arg = "-- %s %s||:"; /* "||:" is to return 0 */
const char *input_name_sq[2];
const char *label_path[2];
char *cmd;