diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/rev-parse.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index ed200c8af1..293428fa0d 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -622,6 +622,12 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) for (i = 1; i < argc; i++) { const char *arg = argv[i]; + if (as_is) { + if (show_file(arg, output_prefix) && as_is < 2) + verify_filename(prefix, arg, 0); + continue; + } + if (!strcmp(arg, "--local-env-vars")) { int i; for (i = 0; local_repo_env[i]; i++) @@ -655,11 +661,6 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) i++; continue; } - if (as_is) { - if (show_file(arg, output_prefix) && as_is < 2) - verify_filename(prefix, arg, 0); - continue; - } if (!strcmp(arg,"-n")) { if (++i >= argc) die("-n requires an argument"); |