Subject: Re: [PATCH 2/7] stash: integrate with sparse index

From: Junio C Hamano <[email-masked]>
Date: Mon, 25 Apr 2022 14:34:34 -0700

"Victoria Dye via GitGitGadget" <[email-masked]> writes:

> From: Victoria Dye <[email-masked]>
>
> Enable sparse index in 'git stash' by disabling
> 'command_requires_full_index'.
>
> With sparse index enabled, some subcommands of 'stash' work without
> expanding the index, e.g., 'git stash', 'git stash list', 'git stash drop',
> etc. Others ensure the index is expanded either directly (as in the case of
> 'git stash [pop|apply]', where the call to 'merge_recursive_generic()' in
> 'do_apply_stash()' triggers the expansion), or in a command called
> internally by stash (e.g., 'git update-index' in 'git stash -u'). So, in
> addition to enabling sparse index, add tests to 't1092' demonstrating which
> variants of 'git stash' expand the index, and which do not.

As always, it is suprising that the change id deceptively easy, but
it is only true because various components like the merge machinery
used by the code have been taught to expand the sparse index entries
as needed.  Looking good so far.