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

[PATCH 0/3] Fix stash apply in sparse checkouts (and a submodule test)

From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 20, 2020, 16:53 UTC
Message-ID
<pull.919.git.git.1605891222.gitgitgadget@gmail.com>

Heavier usage of sparse-checkouts at $DAYJOB is commencing. And an issue with git stash apply was found.

git stash's implementation as a pipeline of forked commands presents some problems, especially when implemented atop of three commands that all behave differently in the presence of sparse checkouts. Add a testcase demonstrating some issues with git stash apply in a repository with a different set of sparse-checkout patterns at apply vs create time, clean up the relevant section of git stash code, and incidentally fix a submodule testcase unrelated to sparse checkouts. Provide some detailed commit messages explaining the issues along the way.

NOTE: I found a couple minor issues with other commands in sparse checkouts
while debugging this issue, but I don't yet have fixes for them and I can
submit them separately.
Elijah Newren (3):
  t7012: add a testcase demonstrating stash apply bugs in sparse
    checkouts
  stash: remove unnecessary process forking
  stash: fix stash application in sparse-checkouts
 builtin/stash.c                  | 130 +++++++++++++++++++++----------
 t/lib-submodule-update.sh        |  16 ++--
 t/t7012-skip-worktree-writing.sh |  88 +++++++++++++++++++++
 3 files changed, 184 insertions(+), 50 deletions(-)
base-commit: faefdd61ec7c7f6f3c8c9907891465ac9a2a1475
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-919%2Fnewren%2Fsparse-checkout-fixups-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-919/newren/sparse-checkout-fixups-v1
Pull-Request: https://github.com/git/git/pull/919
-- 
gitgitgadget
Next: Elijah Newren via GitGitGadget
Message 1 of 14 in “Fix stash apply in sparse checkouts (and a submodule test)”
  1. 0/3 Fix stash apply in sparse checkouts (and a submodule test)Elijah Newren via GitGitGadget, Nov 20, 2020
  2. 1/3 t7012: add a testcase demonstrating stash apply bugs in sparse checkoutsElijah Newren via GitGitGadget, Nov 20, 2020
  3. 2/3 stash: remove unnecessary process forkingElijah Newren via GitGitGadget, Nov 20, 2020
  4. 3/3 stash: fix stash application in sparse-checkoutsElijah Newren via GitGitGadget, Nov 20, 2020
  5. Chris TorekNov 21, 2020
  6. Elijah NewrenNov 22, 2020
  7. Junio C HamanoNov 25, 2020
  8. Elijah NewrenNov 26, 2020
  9. 0/3 Fix stash apply in sparse checkouts (and a submodule test)Elijah Newren via GitGitGadget, Dec 1, 2020
  10. 2/3 stash: remove unnecessary process forkingElijah Newren via GitGitGadget, Dec 1, 2020
  11. Junio C HamanoDec 1, 2020
  12. Elijah NewrenDec 2, 2020
  13. 3/3 stash: fix stash application in sparse-checkoutsElijah Newren via GitGitGadget, Dec 1, 2020
  14. 1/3 t7012: add a testcase demonstrating stash apply bugs in sparse checkoutsElijah Newren via GitGitGadget, Dec 1, 2020

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.