Re: [PATCH v2 2/2] stash: handle staged changes in skip-worktree files correctly
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 30, 2019, 01:16 UTC
- Message-ID
- <xmqq1ruv58yv.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <9835e66399b5feeb3313bcee62f0519c025a4ca2.1572261615.git.gitgitgadget@gmail.com>
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 5 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de> > > When calling `git stash` while changes were staged for files that are > marked with the `skip-worktree` bit (e.g. files that are excluded in a > sparse checkout), the files are recorded as _deleted_ instead.
Good. Much easier to see what is going on than the verb "lose" used in the cover letter of v1 that puzzled me.
Show 5 quoted lines
> However, when the temporary index is updated via `git update-index --add > --remove`, skip-worktree entries mark the files as deleted by mistake. > > Let's use the newly-introduced `--ignore-skip-worktree-entries` option > of `git update-index` to prevent exactly this from happening.
Good.
> Note that the regression test case deliberately avoids replicating the > scenario described above and instead tries to recreate just the symptom.
That's good. Testing the end-user visible effect is just as important as the narrowly pointed root-cause test like the one in the previous patch.
Thanks.