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

[PATCH 0/2] merge-ours: sparse-index integration

From
Sam Bostock via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 6, 2026, 02:32 UTC
Message-ID
<pull.2189.git.git.1770345124.gitgitgadget@gmail.com>
This short series teaches merge-ours to work with a sparse index.

Patch 1 is a preparatory cleanup that converts merge-ours away from the_repository global, using the repo parameter instead.

Patch 2 adds the actual sparse-index integration and tests. Because merge-ours is invoked as a subprocess by git merge -s ours and never previously read config, the sparse-checkout globals remained unset, causing the index to be expanded unconditionally. A repo_config() call fixes this.

Developed with AI assistance (Claude).
Sam Bostock (2):
  merge-ours: drop USE_THE_REPOSITORY_VARIABLE
  merge-ours: integrate with sparse-index
 builtin/merge-ours.c                     | 15 +++++++++------
 t/t1092-sparse-checkout-compatibility.sh | 14 ++++++++++++++
 2 files changed, 23 insertions(+), 6 deletions(-)
base-commit: b2826b52eb7caff9f4ed6e85ec45e338bf02ad09
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2189%2Fsambostock%2Fsb%2Fmerge-ours-sparse-index-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2189/sambostock/sb/merge-ours-sparse-index-v1
Pull-Request: https://github.com/git/git/pull/2189
-- 
gitgitgadget
Next: Sam Bostock via GitGitGadget
Message 1 of 11 in “merge-ours: sparse-index integration”
  1. 0/2 merge-ours: sparse-index integrationSam Bostock via GitGitGadget, Feb 6, 2026
  2. 1/2 merge-ours: drop USE_THE_REPOSITORY_VARIABLESam Bostock via GitGitGadget, Feb 6, 2026
  3. Patrick SteinhardtFeb 6, 2026
  4. Junio C HamanoFeb 6, 2026
  5. 2/2 merge-ours: integrate with sparse-indexSam Bostock via GitGitGadget, Feb 6, 2026
  6. Junio C HamanoFeb 6, 2026
  7. 0/2 merge-ours: sparse-index integrationSam Bostock via GitGitGadget, Feb 6, 2026
  8. 2/2 merge-ours: integrate with sparse-indexSam Bostock via GitGitGadget, Feb 6, 2026
  9. 1/2 merge-ours: drop USE_THE_REPOSITORY_VARIABLESam Bostock via GitGitGadget, Feb 6, 2026
  10. Patrick SteinhardtFeb 9, 2026
  11. Derrick StoleeFeb 10, 2026

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.