Fix git-rev-parse breakage

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:04
Subsystem: the rest · Maintainer: Linus Torvalds

The --flags cleanup caused problems: we used to depend on the fact that 
"revs_only" magically suppressed flags, adn that assumption was broken by 
the recent fixes.

It wasn't a good assumption in the first place, so instead of 
re-introducing it, let's just get rid of it.

This makes "--revs-only" imply "--no-flags".

[ Side note: we might want to get rid of these confusing two-way flags, 
  where some flags say "only print xxx", and others say "don't print yyy". 
  We'd be better off with just three flags that say "print zzz", where zzz
  is one of "flags, revs, norevs" ]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
diff --git a/rev-parse.c b/rev-parse.c
--- a/rev-parse.c
+++ b/rev-parse.c
@@ -160,6 +160,7 @@ int main(int argc, char **argv)
 			}
 			if (!strcmp(arg, "--revs-only")) {
 				revs_only = 1;
+				no_flags = 1;
 				continue;
 			}
 			if (!strcmp(arg, "--no-revs")) {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help