git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Elijah Newren <newren@gmail.com>
Date
Jul 21, 2018, 06:34 UTC
Message-ID
<20180721063428.20518-1-newren@gmail.com>
In-Reply-To
<5a8d1098-b4c5-64e1-da98-dac13521e7ba@gmail.com>

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
Previous: Ben PeartNext: Elijah Newren
Message 8 of 22 in “[BUG] merge-recursive overly aggressive when skipping updating the working tree”
  1. Ben PeartJul 20, 2018
  2. Elijah NewrenJul 20, 2018
  3. Junio C HamanoJul 20, 2018
  4. Elijah NewrenJul 20, 2018
  5. Junio C HamanoJul 20, 2018
  6. Elijah NewrenJul 20, 2018
  7. Ben PeartJul 23, 2018
  8. 0/2 Preserve skip_worktree bit in merges when necessaryElijah Newren, Jul 21, 2018
  9. 1/2 t3507: add a testcase showing failure with sparse checkoutElijah Newren, Jul 21, 2018
  10. Eric SunshineJul 21, 2018
  11. Ben PeartJul 23, 2018
  12. Eric SunshineJul 23, 2018
  13. Ben PeartJul 23, 2018
  14. Ben PeartJul 21, 2018
  15. Junio C HamanoJul 23, 2018
  16. 2/2 merge-recursive: preserve skip_worktree bit when necessaryElijah Newren, Jul 21, 2018
  17. Ben PeartJul 23, 2018
  18. 0/2 Preserve skip_worktree bit in merges when necessaryBen Peart, Jul 27, 2018
  19. 1/2 t3507: add a testcase showing failure with sparse checkoutBen Peart, Jul 27, 2018
  20. 2/2 merge-recursive: preserve skip_worktree bit when necessaryBen Peart, Jul 27, 2018
  21. Junio C HamanoJul 27, 2018
  22. Elijah NewrenJul 31, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.