diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-19 20:17:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-19 20:33:38 -0700 |
commit | 6db41050a360d83e89114602ecc81c208323080f (patch) | |
tree | 7a9f293d1cb3441cb34fec70cfd0a307302c21a3 /merge-recursive.c | |
parent | d192508cd6867059ccc4ce0946ec1110028dad37 (diff) | |
download | git-6db41050a360d83e89114602ecc81c208323080f.tar.gz |
Revert "Merge branch 'en/merge-recursive'"
As the band-aid to merge-recursive seems to regress complex merges in an
unpleasant way. The merge-recursive implementation needs to be rewritten
in such a way that it resolves renames and D/F conflicts entirely in-core
and not to touch working tree at all while doing so. But in the meantime,
this reverts commit ac9666f84 that merged the topic in its entirety.
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 07ad1a3be4..db9ba19ddf 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -341,11 +341,10 @@ static void make_room_for_directories_of_df_conflicts(struct merge_options *o, * make room for the corresponding directory. Such paths will * later be processed in process_df_entry() at the end. If * the corresponding directory ends up being removed by the - * merge, then the file will be reinstated at that time - * (albeit with a different timestamp!); otherwise, if the - * file is not supposed to be removed by the merge, the - * contents of the file will be placed in another unique - * filename. + * merge, then the file will be reinstated at that time; + * otherwise, if the file is not supposed to be removed by the + * merge, the contents of the file will be placed in another + * unique filename. * * NOTE: This function relies on the fact that entries for a * D/F conflict will appear adjacent in the index, with the @@ -356,13 +355,6 @@ static void make_room_for_directories_of_df_conflicts(struct merge_options *o, int last_len = 0; int i; - /* - * Do not do any of this crazyness during the recursive; we don't - * even write anything to the working tree! - */ - if (o->call_depth) - return; - for (i = 0; i < entries->nr; i++) { const char *path = entries->items[i].string; int len = strlen(path); @@ -1265,13 +1257,9 @@ static int merge_content(struct merge_options *o, } if (mfi.clean && !df_conflict_remains && - sha_eq(mfi.sha, a_sha) && mfi.mode == a.mode && - !o->call_depth && !lstat(path, &st)) { + sha_eq(mfi.sha, a_sha) && mfi.mode == a.mode) output(o, 3, "Skipped %s (merged same as existing)", path); - add_cacheinfo(mfi.mode, mfi.sha, path, - 0 /*stage*/, 1 /*refresh*/, 0 /*options*/); - return mfi.clean; - } else + else output(o, 2, "Auto-merging %s", path); if (!mfi.clean) { |