summaryrefslogtreecommitdiff
path: root/pack-revindex.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2020-05-04 18:27:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-04 19:57:15 (GMT)
commitace224ac5fb120e9cae894e31713ab60e91f141f (patch)
tree89ebc967f82c94fb619d336bf1f80f43afe5f0ae /pack-revindex.c
parent5644ca28cded68972c74614fc06d6e0e1db1a7de (diff)
downloadgit-ace224ac5fb120e9cae894e31713ab60e91f141f.zip
git-ace224ac5fb120e9cae894e31713ab60e91f141f.tar.gz
git-ace224ac5fb120e9cae894e31713ab60e91f141f.tar.bz2
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 'pack-revindex.c')
0 files changed, 0 insertions, 0 deletions