summaryrefslogtreecommitdiff
path: root/builtin-rev-parse.c
diff options
context:
space:
mode:
authorMatthias Lederhofer <matled@gmx.net>2007-06-03 14:46:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-06-06 23:07:53 (GMT)
commit493c774e58a05bbbac06e4ae1654ca3d24e4e5cf (patch)
tree0ba0afdae1fcb024f1323d34abff3049c26a5a1e /builtin-rev-parse.c
parent4faac2468de86f4dfd482d55d7c9adc7f2796f07 (diff)
downloadgit-493c774e58a05bbbac06e4ae1654ca3d24e4e5cf.zip
git-493c774e58a05bbbac06e4ae1654ca3d24e4e5cf.tar.gz
git-493c774e58a05bbbac06e4ae1654ca3d24e4e5cf.tar.bz2
rev-parse: introduce --is-bare-repository
Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-rev-parse.c')
-rw-r--r--builtin-rev-parse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin-rev-parse.c b/builtin-rev-parse.c
index 37addb2..71d5162 100644
--- a/builtin-rev-parse.c
+++ b/builtin-rev-parse.c
@@ -352,6 +352,11 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
: "false");
continue;
}
+ if (!strcmp(arg, "--is-bare-repository")) {
+ printf("%s\n", is_bare_repository() ? "true"
+ : "false");
+ continue;
+ }
if (!prefixcmp(arg, "--since=")) {
show_datestring("--max-age=", arg+8);
continue;