Link git-name-rev and git-symbolic-ref from the main git page
[git.git] / rev-parse.c
index 85230df..adfc68c 100644 (file)
@@ -153,6 +153,7 @@ static void show_datestring(const char *flag, const char *datestr)
 
 static void show_file(const char *arg)
 {
+       show_default();
        if ((filter & (DO_NONFLAGS|DO_NOREV)) == (DO_NONFLAGS|DO_NOREV))
                show(arg);
 }
@@ -174,6 +175,9 @@ int main(int argc, char **argv)
                if (*arg == '-') {
                        if (!strcmp(arg, "--")) {
                                as_is = 1;
+                               /* Pass on the "--" if we show anything but files.. */
+                               if (filter & (DO_FLAGS | DO_REVS))
+                                       show_file(arg);
                                continue;
                        }
                        if (!strcmp(arg, "--default")) {