diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-04-13 03:12:08 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-15 19:54:45 +0400 |
commit | 08d595dc1cdf6f0d8e6022a69c4fcdd2fba628cf (patch) | |
tree | 16b4f6d24e7a3419f6e247d9fd3498189d5c731d /t/t3001-ls-files-others-exclude.sh | |
parent | 85e7e81ccfcec98972e341ab81b0109084b84906 (diff) |
checkout: add --ignore-skip-worktree-bits in sparse checkout mode
"git checkout -- <paths>" is usually used to restore all modified
files in <paths>. In sparse checkout mode, this command is overloaded
with another meaning: to add back all files in <paths> that are
excluded by sparse patterns.
As the former makes more sense for day-to-day use. Switch it to the
default and the latter enabled with --ignore-skip-worktree-bits.
While at there, add info/sparse-checkout to gitrepository-layout.txt
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3001-ls-files-others-exclude.sh')
-rwxr-xr-x | t/t3001-ls-files-others-exclude.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh index efb7ebc91f..2d274bf8ff 100755 --- a/t/t3001-ls-files-others-exclude.sh +++ b/t/t3001-ls-files-others-exclude.sh @@ -103,7 +103,7 @@ test_expect_success \ test_cmp expect output' test_expect_success 'restore gitignore' ' - git checkout $allignores && + git checkout --ignore-skip-worktree-bits $allignores && rm .git/index ' |