diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2021-07-14 13:12:29 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-14 13:42:48 -0700 |
commit | bf26c06f126219498a10ae9f8923cfb0bcbad823 (patch) | |
tree | d5938a1c3abbcfe4416cd0e8b111b26d359ae892 /builtin/commit.c | |
parent | e669ffb2b8f7effa4f6876f61c35ae5c4a8566b2 (diff) |
t1092: add tests for status/add and sparse files
Before moving to update 'git status' and 'git add' to work with sparse
indexes, add an explicit test that ensures the sparse-index works the
same as a normal sparse-checkout when the worktree contains directories
and files outside of the sparse cone.
Specifically, 'folder1/a' is a file in our test repo, but 'folder1' is
not in the sparse cone. When 'folder1/a' is modified, the file is not
shown as modified and adding it will fail. This is new behavior as of
a20f704 (add: warn when asked to update SKIP_WORKTREE entries,
2021-04-08). Before that change, these adds would be silently ignored.
Untracked files are fine: adding new files both with 'git add .' and
'git add folder1/' works just as in a full checkout. This may not be
entirely desirable, but we are not intending to change behavior at the
moment, only document it. A future change could alter the behavior to
be more sensible, and this test could be modified to satisfy the new
expected behavior.
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions