summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-10-03 15:42:48 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-03 15:42:48 +0900
commit2f777fad342e5a12cc910516ba575db4c3e4e53a (patch)
tree5e84e590e103c21e6decdf83fac351b1a2d59cd6
parentMerge branch 'sd/branch-copy' (diff)
parentsubmodule.c: describe submodule_to_gitdir() in a new comment (diff)
downloadtgif-2f777fad342e5a12cc910516ba575db4c3e4e53a.tar.xz
Merge branch 'hn/submodule-comment'
* hn/submodule-comment: submodule.c: describe submodule_to_gitdir() in a new comment
-rw-r--r--submodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/submodule.c b/submodule.c
index f2f30bb488..3e3ea11761 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;