diff --git a/builtin-rev-parse.c b/builtin-rev-parse.c
index d14fe20692aa0903f45da96bf9f31f4564b7816a..a8c5043dedd785b8fc43c0921edd01e2adac65e1 100644 (file)
--- a/builtin-rev-parse.c
+++ b/builtin-rev-parse.c
for_each_remote_ref(show_reference, NULL);
continue;
}
+ if (!strcmp(arg, "--show-toplevel")) {
+ const char *work_tree = get_git_work_tree();
+ if (work_tree)
+ puts(work_tree);
+ continue;
+ }
if (!strcmp(arg, "--show-prefix")) {
if (prefix)
puts(prefix);