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

1 messages from 2005-10-21 to 2005-10-21. Participants: Linus Torvalds.
Thread: https://gitlist.dev/t/2177

## Linus Torvalds, 2005-10-21 04:17

Subject: git-rev-parse: one more fix for "--"
Message-ID: <Pine.LNX.4.64.0510202115180.423@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0510202115180.423%40g5.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);

```
