summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2017-09-25 17:59:26 +0200
committerJunio C Hamano <gitster@pobox.com>2017-09-26 14:08:23 +0900
commit3ce08548bb8768259c98f7fcf30be4c0bae9c611 (patch)
tree4d9b8080026856839e288a1496d5d6d9af1793ec
parent28996cec80690d2322359d3650a57e8de6e01eb6 (diff)
downloadgit-hn/submodule-comment.tar.gz
submodule.c: describe submodule_to_gitdir() in a new commenthn/submodule-comment
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--submodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/submodule.c b/submodule.c
index b12600fc79..50bf3fb09c 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1997,6 +1997,10 @@ const char *get_superproject_working_tree(void)
return ret;
}
+/*
+ * Put the gitdir for a submodule (given relative to the main
+ * repository worktree) into `buf`, or return -1 on error.
+ */
int submodule_to_gitdir(struct strbuf *buf, const char *submodule)
{
const struct submodule *sub;