Derrick Stolee <derrickstolee@xxxxxxxxxx> writes: > On 4/25/2022 1:49 PM, Victoria Dye via GitGitGadget wrote: >> From: Victoria Dye <vdye@xxxxxxxxxx> >> >> Enable sparse index in 'git stash' by disabling >> 'command_requires_full_index'. > >> ensure_not_expanded () { >> rm -f trace2.txt && >> - echo >>sparse-index/untracked.txt && >> + if test -z $WITHOUT_UNTRACKED_TXT > > Do we need quotes around "$WITHOUT_UNTRACKED_TXT"? > > I mean, I suppose we don't since the tests pass when this variable > is unset, but I think it is a good practice to be careful about > empty variables. Or am I wrong? Interesting. I do not think the reason why test -z && echo true says "true" is "-z" noticed an empty string---it is "test $string" that says "true" when "$string" is not a recognised command and is not an empty string, no? You are absolutely right that the above must be quoted. Thanks for carefully reading.