summaryrefslogtreecommitdiff
path: root/rev-parse.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2005-08-23 10:47:54 -0700
committerJunio C Hamano <junkio@cox.net>2005-08-23 12:42:58 -0700
commit0360e99d06acfbb0fcb72215cf6749591ee53290 (patch)
treed4005fe4460af08012be3a0cdd844c48aa8b1459 /rev-parse.c
parent7fc9d69fca0ea8afab6709622b694f31662fb2ee (diff)
downloadgit-0360e99d06acfbb0fcb72215cf6749591ee53290.tar.gz
[PATCH] Fix git-rev-parse --default and --flags handling
This makes the argument to --default and any --flags arguments should up correctly, and makes "--" together with --flags act sanely. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'rev-parse.c')
-rw-r--r--rev-parse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rev-parse.c b/rev-parse.c
index f1f5163447..9281b45d1f 100644
--- a/rev-parse.c
+++ b/rev-parse.c
@@ -107,7 +107,7 @@ static void show_arg(char *arg)
if (do_rev_argument && is_rev_argument(arg))
show_rev_arg(arg);
else
- show_norev(arg);
+ show(arg);
}
static void show_default(void)
@@ -122,7 +122,7 @@ static void show_default(void)
show_rev(NORMAL, sha1, s);
return;
}
- show_arg(s);
+ show_norev(s);
}
}
@@ -149,7 +149,7 @@ int main(int argc, char **argv)
if (*arg == '-') {
if (!strcmp(arg, "--")) {
show_default();
- if (revs_only)
+ if (revs_only || flags_only)
break;
as_is = 1;
}