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

Re: [PATCH v2 2/3] stash: remove unnecessary process forking

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 1, 2020, 23:02 UTC
Message-ID
<xmqqr1o9m8on.fsf@gitster.c.googlers.com>
In-Reply-To
<1fa263cf3c3d1b0c20ad89e6454a7b903a07f193.1606861519.git.gitgitgadget@gmail.com>
"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
>     git diff-index --cached --name-only --diff-filter=A $CTREE >"$a"
>     git read-tree --reset $CTREE
>     git update-index --add --stdin <"$a"
>     rm -f "$a"

This is orthogonal to what this patch does, as this is supposed to be just bug-for-bug compatible rewrite.

But I wonder if the above sequence, whether it is done as a series of plumbing invocations or subroutine calls, is a relic dating back in the days before i-t-a existed. If we want to revert the changes to the index for working tree files for removed or modified ones, I do not offhand see a good reason why we would want to keep the contents to new paths---if i-t-a were available when the sequence was designed, I suspect we would just have added the path as i-t-a in order to keep track of the presence of the path but not necessarily the contents in it.

Previous: Elijah Newren via GitGitGadgetNext: Elijah Newren
Message 11 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.