git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Fix git-rev-parse breakage

From
Linus Torvalds <torvalds@osdl.org>
Date
Aug 24, 2005, 02:17 UTC
Message-ID
<Pine.LNX.4.58.0508231908170.3317@g5.osdl.org>

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")) {
Next: Junio C Hamano
Message 1 of 6 in “Fix git-rev-parse breakage”
  1. Linus TorvaldsAug 24, 2005
  2. Junio C HamanoAug 24, 2005
  3. Junio C HamanoAug 24, 2005
  4. Linus TorvaldsAug 24, 2005
  5. Audit rev-parse users again.Junio C Hamano, Aug 24, 2005
  6. Rationalize output selection in rev-parse.Junio C Hamano, Aug 24, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.