Skip to content

Commit

Permalink
t1092: document bad sparse-checkout behavior
Browse files Browse the repository at this point in the history
There are several situations where a repository with sparse-checkout
enabled will act differently than a normal repository, and in ways that
are not intentional. The test t1092-sparse-checkout-compatibility.sh
documents some of these deviations, but a casual reader might think
these are intentional behavior changes.

Add comments on these tests that make it clear that these behaviors
should be updated. Using 'NEEDSWORK' helps contributors find that these
are potential areas for improvement.

Helped-by: Elijah Newren <[email protected]>
Reviewed-by: Elijah Newren <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
derrickstolee authored and gitster committed Jul 14, 2021
1 parent f8fe49e commit e5ca291
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions t/t1092-sparse-checkout-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ test_expect_failure 'blame with pathspec outside sparse definition' '
test_all_match git blame deep/deeper2/deepest/a
'

# TODO: reset currently does not behave as expected when in a
# sparse-checkout.
# NEEDSWORK: a sparse-checkout behaves differently from a full checkout
# in this scenario, but it shouldn't.
test_expect_failure 'checkout and reset (mixed)' '
init_repos &&
Expand All @@ -403,8 +403,8 @@ test_expect_failure 'checkout and reset (mixed)' '
test_all_match git reset update-folder2
'

# Ensure that sparse-index behaves identically to
# sparse-checkout with a full index.
# NEEDSWORK: a sparse-checkout behaves differently from a full checkout
# in this scenario, but it shouldn't.
test_expect_success 'checkout and reset (mixed) [sparse]' '
init_repos &&
Expand Down Expand Up @@ -524,6 +524,8 @@ test_expect_success 'sparse-index is not expanded' '
test_region ! index ensure_full_index trace2.txt
'

# NEEDSWORK: a sparse-checkout behaves differently from a full checkout
# in this scenario, but it shouldn't.
test_expect_success 'reset mixed and checkout orphan' '
init_repos &&
Expand Down

0 comments on commit e5ca291

Please sign in to comment.