summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-19 10:48:38 -0700
committerJunio C Hamano <gitster@pobox.com>2011-10-19 10:48:38 -0700
commit2201cc8c977918c520e70093f4b74bbdf70afcc5 (patch)
treefb02d2b778207f6d4e91940e1e568031b8cb9698 /submodule.c
parentc31b87d111f6df359255979ea94e8648a51c3647 (diff)
parent80988783c8c417c5e914256b43ed3604cc8fa4c3 (diff)
downloadgit-2201cc8c977918c520e70093f4b74bbdf70afcc5.tar.gz
Merge branch 'bk/submodule-in-recursive-merge'
* bk/submodule-in-recursive-merge: submodule: Search for merges only at end of recursive merge submodule: Demonstrate known breakage during recursive merge
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c
index 0b709bc291..0fd10a0fdb 100644
--- a/submodule.c
+++ b/submodule.c
@@ -794,7 +794,7 @@ static void print_commit(struct commit *commit)
int merge_submodule(unsigned char result[20], const char *path,
const unsigned char base[20], const unsigned char a[20],
- const unsigned char b[20])
+ const unsigned char b[20], int search)
{
struct commit *commit_base, *commit_a, *commit_b;
int parent_count;
@@ -849,6 +849,10 @@ int merge_submodule(unsigned char result[20], const char *path,
* user needs to confirm the resolution.
*/
+ /* Skip the search if makes no sense to the calling context. */
+ if (!search)
+ return 0;
+
/* find commit which merges them */
parent_count = find_first_merges(&merges, path, commit_a, commit_b);
switch (parent_count) {