summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: adc3dbc)
raw | patch | inline | side by side (parent: adc3dbc)
author | Linus Torvalds <torvalds@osdl.org> | |
Fri, 21 Oct 2005 00:16:30 +0000 (17:16 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 21 Oct 2005 05:32:07 +0000 (22:32 -0700) |
If rev-parse output includes both flags and files, we should pass on any
"--" marker we see, so that the end result can also tell the difference
between a flag and a filename that begins with '-'.
[jc: merged a later one liner updates from Linus]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
"--" marker we see, so that the end result can also tell the difference
between a flag and a filename that begins with '-'.
[jc: merged a later one liner updates from Linus]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
rev-parse.c | patch | blob | history |
diff --git a/rev-parse.c b/rev-parse.c
index 85230dfaa9d943938bffa0266490fd6956ee7a4f..243f89f3ccd5b96dc517249673d4cfc994ddb888 100644 (file)
--- a/rev-parse.c
+++ b/rev-parse.c
if (*arg == '-') {
if (!strcmp(arg, "--")) {
as_is = 1;
+ show_default();
+ /* Pass on the "--" if we show anything but files.. */
+ if (filter & (DO_FLAGS | DO_REVS))
+ show_file(arg);
continue;
}
if (!strcmp(arg, "--default")) {