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

git-rev-parse: one more fix for "--"

From
Linus Torvalds <torvalds@osdl.org>
Date
Oct 21, 2005, 04:17 UTC
Message-ID
<Pine.LNX.4.64.0510202115180.423@g5.osdl.org>

My previous "--" fixup case missed one case: it would print any default revision after the "--" rather than before.

Trivially fixed.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---

Gaah. If you haven't applied the previous patch yet, just combine the two diffs into one.

diff --git a/rev-parse.c b/rev-parse.c
index 9ae2512..243f89f 100644
--- a/rev-parse.c
+++ b/rev-parse.c
@@ -174,6 +174,7 @@ int main(int argc, char **argv)
 		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);
Message 1 of 1 in “git-rev-parse: one more fix for "--"”
  1. Linus TorvaldsOct 21, 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.