summaryrefslogtreecommitdiff
path: root/t/t5515
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2020-05-04 18:27:43 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-05-04 12:57:15 -0700
commitace224ac5fb120e9cae894e31713ab60e91f141f (patch)
tree89ebc967f82c94fb619d336bf1f80f43afe5f0ae /t/t5515
parentsparse-checkout: provide a new reapply subcommand (diff)
downloadtgif-ace224ac5fb120e9cae894e31713ab60e91f141f.tar.xz
sparse-checkout: stop blocking empty workdirs
Remove the error condition when updating the sparse-checkout leaves an empty working directory. This behavior was added in 9e1afb167 (sparse checkout: inhibit empty worktree, 2009-08-20). The comment was added in a7bc906f2 (Add explanation why we do not allow to sparse checkout to empty working tree, 2011-09-22) in response to a "dubious" comment in 84563a624 (unpack-trees.c: cosmetic fix, 2010-12-22). With the recent "cone mode" and "git sparse-checkout init [--cone]" command, it is common to set a reasonable sparse-checkout pattern set of /* !/*/ which matches only files at root. If the repository has no such files, then their "git sparse-checkout init" command will fail. Now that we expect this to be a common pattern, we should not have the commands fail on an empty working directory. If it is a confusing result, then the user can recover with "git sparse-checkout disable" or "git sparse-checkout set". This is especially simple when using cone mode. Reported-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5515')
0 files changed, 0 insertions, 0 deletions