Merge branch 'ow/rev-parse-is-shallow-repo' into next
[gitweb.git] / builtin / rev-parse.c
index 37f4209c24e7ffd296fe6ddf81afddc4683c81fc..a8d7e6f7aecc2e4179547bde3fd6d07231764b9f 100644 (file)
@@ -878,6 +878,11 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
                                                : "false");
                                continue;
                        }
+                       if (!strcmp(arg, "--is-shallow-repository")) {
+                               printf("%s\n", is_repository_shallow() ? "true"
+                                               : "false");
+                               continue;
+                       }
                        if (!strcmp(arg, "--shared-index-path")) {
                                if (read_cache() < 0)
                                        die(_("Could not read the index"));