Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'ma/update-hooks-sample-typofix'
[gitweb.git]
/
builtin
/
rev-parse.c
diff --git
a/builtin/rev-parse.c
b/builtin/rev-parse.c
index bd16876df5ff7bce4fbf348d84a0ebc4ea53e7d7..cf8487b3b95fcca9a8a96a1562646ee8ddd5b354 100644
(file)
--- a/
builtin/rev-parse.c
+++ b/
builtin/rev-parse.c
@@
-763,7
+763,8
@@
int cmd_rev_parse(int argc, const char **argv, const char *prefix)
continue;
}
if (!strcmp(arg, "--git-common-dir")) {
- puts(get_git_common_dir());
+ const char *pfx = prefix ? prefix : "";
+ puts(prefix_filename(pfx, strlen(pfx), get_git_common_dir()));
continue;
}
if (!strcmp(arg, "--resolve-git-dir")) {