diff options
author | Matthias Lederhofer <matled@gmx.net> | 2007-06-03 16:46:36 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-06-06 16:07:53 -0700 |
commit | 493c774e58a05bbbac06e4ae1654ca3d24e4e5cf (patch) | |
tree | 0ba0afdae1fcb024f1323d34abff3049c26a5a1e /builtin-rev-parse.c | |
parent | 4faac2468de86f4dfd482d55d7c9adc7f2796f07 (diff) | |
download | git-493c774e58a05bbbac06e4ae1654ca3d24e4e5cf.tar.gz |
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin-rev-parse.c b/builtin-rev-parse.c index 37addb25fa..71d5162595 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; |