git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Elijah Newren <newren@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
	Git Mailing List <git@vger.kernel.org>,
	Matheus Tavares Bernardino <matheus.bernardino@usp.br>,
	Derrick Stolee <dstolee@microsoft.com>,
	Chris Torek <chris.torek@gmail.com>
Subject: Re: [PATCH v2 2/3] stash: remove unnecessary process forking
Date: Wed, 2 Dec 2020 08:09:52 -0800	[thread overview]
Message-ID: <CABPp-BGTkGO+19_AUrHFF4P8J8g_RnfbL6r4jHkxYvdE5_h8mw@mail.gmail.com> (raw)
In-Reply-To: <xmqqr1o9m8on.fsf@gitster.c.googlers.com>

On Tue, Dec 1, 2020 at 3:02 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> "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.

Yeah, I thought a little bit about the same thing, but wasn't sure if
there was some other reason for the current behavior or if there was
some workflow that might be relying upon it.  Rather than investigate
and try to switch it over to i-t-a (which could still be done later),
I more narrowly focused this series at just doing the "make the
changes be available in the working tree, but remove them from the
index unless it'd make it untracked" more carefully.

  reply	other threads:[~2020-12-02 16:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20 16:53 [PATCH 0/3] Fix stash apply in sparse checkouts (and a submodule test) Elijah Newren via GitGitGadget
2020-11-20 16:53 ` [PATCH 1/3] t7012: add a testcase demonstrating stash apply bugs in sparse checkouts Elijah Newren via GitGitGadget
2020-11-20 16:53 ` [PATCH 2/3] stash: remove unnecessary process forking Elijah Newren via GitGitGadget
2020-11-20 16:53 ` [PATCH 3/3] stash: fix stash application in sparse-checkouts Elijah Newren via GitGitGadget
2020-11-21 12:47   ` Chris Torek
2020-11-22  3:47     ` Elijah Newren
2020-11-25 22:14 ` [PATCH 0/3] Fix stash apply in sparse checkouts (and a submodule test) Junio C Hamano
2020-11-26  5:31   ` Elijah Newren
2020-12-01 22:25 ` [PATCH v2 " Elijah Newren via GitGitGadget
2020-12-01 22:25   ` [PATCH v2 1/3] t7012: add a testcase demonstrating stash apply bugs in sparse checkouts Elijah Newren via GitGitGadget
2020-12-01 22:25   ` [PATCH v2 2/3] stash: remove unnecessary process forking Elijah Newren via GitGitGadget
2020-12-01 23:02     ` Junio C Hamano
2020-12-02 16:09       ` Elijah Newren [this message]
2020-12-01 22:25   ` [PATCH v2 3/3] stash: fix stash application in sparse-checkouts Elijah Newren via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABPp-BGTkGO+19_AUrHFF4P8J8g_RnfbL6r4jHkxYvdE5_h8mw@mail.gmail.com \
    --to=newren@gmail.com \
    --cc=chris.torek@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=matheus.bernardino@usp.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).