rev-parse: rev-parse: add --is-shallow-repository
[gitweb.git] / builtin / rev-parse.c
index c78b7b33d6604bb38a16e30d64cfabee0fd67f40..44e9a48e02363db902ac7358251c0098f396ce6e 100644 (file)
@@ -868,6 +868,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"));