Skip to content

Commit

Permalink
Merge branch 'en/merge-path-collision'
Browse files Browse the repository at this point in the history
Updates for corner cases in merge-recursive.

* en/merge-path-collision:
  t6036: avoid non-portable "cp -a"
  merge-recursive: combine error handling
  t6036, t6043: increase code coverage for file collision handling
  merge-recursive: improve rename/rename(1to2)/add[/add] handling
  merge-recursive: use handle_file_collision for add/add conflicts
  merge-recursive: improve handling for rename/rename(2to1) conflicts
  merge-recursive: fix rename/add conflict handling
  merge-recursive: new function for better colliding conflict resolutions
  merge-recursive: increase marker length with depth of recursion
  t6036, t6042: testcases for rename collision of already conflicting files
  t6042: add tests for consistency in file collision conflict handling
  • Loading branch information
gitster committed Jan 4, 2019
2 parents 3813a89 + cc4cb09 commit ac193e0
Show file tree
Hide file tree
Showing 6 changed files with 1,149 additions and 292 deletions.
4 changes: 3 additions & 1 deletion ll-merge.c
Expand Up @@ -384,7 +384,9 @@ int ll_merge(mmbuffer_t *result_buf,
if (opts->virtual_ancestor) {
if (driver->recursive)
driver = find_ll_merge_driver(driver->recursive);
marker_size += 2;
}
if (opts->extra_marker_size) {
marker_size += opts->extra_marker_size;
}
return driver->fn(driver, result_buf, path, ancestor, ancestor_label,
ours, our_label, theirs, their_label,
Expand Down
1 change: 1 addition & 0 deletions ll-merge.h
Expand Up @@ -13,6 +13,7 @@ struct ll_merge_options {
unsigned virtual_ancestor : 1;
unsigned variant : 2; /* favor ours, favor theirs, or union merge */
unsigned renormalize : 1;
unsigned extra_marker_size;
long xdl_opts;
};

Expand Down

0 comments on commit ac193e0

Please sign in to comment.