From: Junio C Hamano Date: Mon, 18 Jul 2022 20:31:56 +0000 (-0700) Subject: Merge branch 'en/merge-dual-dir-renames-fix' X-Git-Tag: v2.38.0-rc0~151 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3349f288826d54ee056330222a902360c192b0b;p=thirdparty%2Fgit.git Merge branch 'en/merge-dual-dir-renames-fix' Fixes a long-standing corner case bug around directory renames in the merge-ort strategy. * en/merge-dual-dir-renames-fix: merge-ort: fix issue with dual rename and add/add conflict merge-ort: shuffle the computation and cleanup of potential collisions merge-ort: make a separate function for freeing struct collisions merge-ort: small cleanups of check_for_directory_rename t6423: add tests of dual directory rename plus add/add conflict --- e3349f288826d54ee056330222a902360c192b0b diff --cc merge-ort.c index 01f150ef3b,3855f9de25..8b7de0fbd8 --- a/merge-ort.c +++ b/merge-ort.c @@@ -2443,10 -2330,10 +2469,11 @@@ static char *check_for_directory_rename * As it turns out, this also prevents N-way transient rename * confusion; See testcases 9c and 9d of t6043. */ + new_dir = rename_info->value; /* old_dir = rename_info->key; */ otherinfo = strmap_get_entry(dir_rename_exclusions, new_dir); if (otherinfo) { - path_msg(opt, rename_info->key, 1, + path_msg(opt, INFO_DIR_RENAME_SKIPPED_DUE_TO_RERENAME, 1, + rename_info->key, path, new_dir, NULL, _("WARNING: Avoiding applying %s -> %s rename " "to %s, because %s itself was renamed."), rename_info->key, new_dir, path, new_dir);