summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-22 06:27:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-22 06:27:59 (GMT)
commit2d984464c6be7ced6772a8dcf95d6a461a659a78 (patch)
treeebde8778f17609acc0587524636ec4862c065ca9 /merge-recursive.c
parentd25c72f7da5116f7b7a1f88a59d2bc14415a03b2 (diff)
parent68d03e4a6e448aa557f52adef92595ac4d6cd4bd (diff)
downloadgit-2d984464c6be7ced6772a8dcf95d6a461a659a78.zip
git-2d984464c6be7ced6772a8dcf95d6a461a659a78.tar.gz
git-2d984464c6be7ced6772a8dcf95d6a461a659a78.tar.bz2
Merge branch 'hv/submodule-find-ff-merge'
* hv/submodule-find-ff-merge: Implement automatic fast-forward merge for submodules setup_revisions(): Allow walking history in a submodule Teach ref iteration module about submodules Conflicts: submodule.c
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 656e769..638076e 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -20,6 +20,7 @@
#include "attr.h"
#include "merge-recursive.h"
#include "dir.h"
+#include "submodule.h"
static struct tree *shift_tree_object(struct tree *one, struct tree *two,
const char *subtree_shift)
@@ -519,13 +520,15 @@ static void update_file_flags(struct merge_options *o,
void *buf;
unsigned long size;
- if (S_ISGITLINK(mode))
+ if (S_ISGITLINK(mode)) {
/*
* We may later decide to recursively descend into
* the submodule directory and update its index
* and/or work tree, but we do not do that now.
*/
+ update_wd = 0;
goto update_index;
+ }
buf = read_sha1_file(sha, &type, &size);
if (!buf)
@@ -710,8 +713,8 @@ static struct merge_file_info merge_file(struct merge_options *o,
free(result_buf.ptr);
result.clean = (merge_status == 0);
} else if (S_ISGITLINK(a->mode)) {
- result.clean = 0;
- hashcpy(result.sha, a->sha1);
+ result.clean = merge_submodule(result.sha, one->path, one->sha1,
+ a->sha1, b->sha1);
} else if (S_ISLNK(a->mode)) {
hashcpy(result.sha, a->sha1);