From: Junio C Hamano Date: Tue, 3 Oct 2017 06:42:48 +0000 (+0900) Subject: Merge branch 'hn/submodule-comment' X-Git-Tag: v2.15.0-rc0~23 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/2f777fad342e5a12cc910516ba575db4c3e4e53a?ds=inline;hp=-c Merge branch 'hn/submodule-comment' * hn/submodule-comment: submodule.c: describe submodule_to_gitdir() in a new comment --- 2f777fad342e5a12cc910516ba575db4c3e4e53a diff --combined submodule.c index f2f30bb488,50bf3fb09c..3e3ea11761 --- a/submodule.c +++ b/submodule.c @@@ -1685,7 -1685,7 +1685,7 @@@ static int find_first_merges(struct obj add_object_array(merges.objects[i].item, NULL, result); } - free(merges.objects); + object_array_clear(&merges); return result->nr; } @@@ -1790,7 -1790,7 +1790,7 @@@ int merge_submodule(struct object_id *r print_commit((struct commit *) merges.objects[i].item); } - free(merges.objects); + object_array_clear(&merges); return 0; } @@@ -1997,6 -1997,10 +1997,10 @@@ const char *get_superproject_working_tr 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;