diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-08-21 23:27:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-21 23:27:59 -0700 |
commit | 2d984464c6be7ced6772a8dcf95d6a461a659a78 (patch) | |
tree | ebde8778f17609acc0587524636ec4862c065ca9 /merge-recursive.c | |
parent | d25c72f7da5116f7b7a1f88a59d2bc14415a03b2 (diff) | |
parent | 68d03e4a6e448aa557f52adef92595ac4d6cd4bd (diff) | |
download | git-2d984464c6be7ced6772a8dcf95d6a461a659a78.tar.gz |
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.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 656e769b44..638076ec6e 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); |