Merge branch 'ow/rev-parse-is-shallow-repo'
"git rev-parse" learned "--is-shallow-repository", that is to be used in a way similar to existing "--is-bare-repository" and friends. * ow/rev-parse-is-shallow-repo: rev-parse: rev-parse: add --is-shallow-repository
This commit is contained in:
@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user