[PATCH 0/2] Preserve skip_worktree bit in merges when necessary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



merge-recursive used to update files in the working tree
unnecessarily.  This was reported by Linus in the 2.18.0 cycle and
fixed in commit 1de70dbd1 ("merge-recursive: fix check for skipability
of working tree updates", 2018-04-19).  Unfortunately, this bug masked
another one: that merge-recursive cleared the skip_worktree bit for any
files marked as unmerged by unpack_trees(), even if a file-level merge
was clean.

This series fixes the clearing of the skip_worktree bit for files that
merge cleanly and match HEAD.  A future possible improvement exists to
also avoid clearing the skip_worktree bit for files that merge cleanly
but do not match HEAD (for such cases we'd still want to write those
files to the index, but stop updating them in the working tree).

This series applies cleanly to either maint or master (or next or pu).

Two important notes:
  - Need a sign-off from Ben for the first patch
  - I'm out on vacation next week, so I won't be able to respond to
    feedback or handle any necessary re-rolls until I return.

Ben Peart (1):
  t3507: add a testcase showing failure with sparse checkout

Elijah Newren (1):
  merge-recursive: preserve skip_worktree bit when necessary

 merge-recursive.c               | 16 ++++++++++++++++
 t/t3507-cherry-pick-conflict.sh | 13 +++++++++++++
 2 files changed, 29 insertions(+)

-- 
2.18.0.234.g2d1e6cefb



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux