t: reorder prune stash checks to match actions
We slightly reorder the assertions following the "git stash" command in several of our tests of the "git lfs prune" command so that the assertions are made in the same order as the stashed modifications. This will ease the addition of more assertions in subsequent commits. We also drop the unnecessary cleanup of the stash and working tree at the end of one test.
This commit is contained in:
parent
fbceac20f5
commit
8785a7e0a1
14
t/t-prune.sh
14
t/t-prune.sh
@ -718,22 +718,16 @@ begin_test "prune keep stashed changes in index"
|
|||||||
git stash
|
git stash
|
||||||
|
|
||||||
# Prove that the stashed data was stored in LFS (should call clean filter)
|
# Prove that the stashed data was stored in LFS (should call clean filter)
|
||||||
assert_local_object "$oid_stashed" "${#content_stashed}"
|
|
||||||
assert_local_object "$oid_indexstashed" "${#content_indexstashed}"
|
assert_local_object "$oid_indexstashed" "${#content_indexstashed}"
|
||||||
|
assert_local_object "$oid_stashed" "${#content_stashed}"
|
||||||
|
|
||||||
# Prune data, should NOT delete stashed file or stashed changes to index
|
# Prune data, should NOT delete stashed file or stashed changes to index
|
||||||
git lfs prune
|
git lfs prune
|
||||||
|
|
||||||
refute_local_object "$oid_oldandpushed" "${#content_oldandpushed}"
|
refute_local_object "$oid_oldandpushed" "${#content_oldandpushed}"
|
||||||
assert_local_object "$oid_retain1" "${#content_retain1}"
|
assert_local_object "$oid_retain1" "${#content_retain1}"
|
||||||
assert_local_object "$oid_stashed" "${#content_stashed}"
|
|
||||||
assert_local_object "$oid_indexstashed" "${#content_indexstashed}"
|
assert_local_object "$oid_indexstashed" "${#content_indexstashed}"
|
||||||
|
assert_local_object "$oid_stashed" "${#content_stashed}"
|
||||||
# Restore working tree from stash
|
|
||||||
git stash pop --index
|
|
||||||
|
|
||||||
# Reset working tree to index from stash
|
|
||||||
git checkout .
|
|
||||||
)
|
)
|
||||||
end_test
|
end_test
|
||||||
|
|
||||||
@ -802,8 +796,8 @@ begin_test "prune keep stashed untracked files"
|
|||||||
git stash -u
|
git stash -u
|
||||||
|
|
||||||
# Prove that ALL stashed data was stored in LFS (should call clean filter)
|
# Prove that ALL stashed data was stored in LFS (should call clean filter)
|
||||||
assert_local_object "$oid_stashed" "${#content_stashed}"
|
|
||||||
assert_local_object "$oid_indexstashed" "${#content_indexstashed}"
|
assert_local_object "$oid_indexstashed" "${#content_indexstashed}"
|
||||||
|
assert_local_object "$oid_stashed" "${#content_stashed}"
|
||||||
assert_local_object "$oid_untrackedstashed" "${#content_untrackedstashed}"
|
assert_local_object "$oid_untrackedstashed" "${#content_untrackedstashed}"
|
||||||
|
|
||||||
# Prune data, should NOT delete stashed file or stashed changes to index
|
# Prune data, should NOT delete stashed file or stashed changes to index
|
||||||
@ -811,8 +805,8 @@ begin_test "prune keep stashed untracked files"
|
|||||||
|
|
||||||
refute_local_object "$oid_oldandpushed" "${#content_oldandpushed}"
|
refute_local_object "$oid_oldandpushed" "${#content_oldandpushed}"
|
||||||
assert_local_object "$oid_retain1" "${#content_retain1}"
|
assert_local_object "$oid_retain1" "${#content_retain1}"
|
||||||
assert_local_object "$oid_stashed" "${#content_stashed}"
|
|
||||||
assert_local_object "$oid_indexstashed" "${#content_indexstashed}"
|
assert_local_object "$oid_indexstashed" "${#content_indexstashed}"
|
||||||
|
assert_local_object "$oid_stashed" "${#content_stashed}"
|
||||||
assert_local_object "$oid_untrackedstashed" "${#content_untrackedstashed}"
|
assert_local_object "$oid_untrackedstashed" "${#content_untrackedstashed}"
|
||||||
)
|
)
|
||||||
end_test
|
end_test
|
||||||
|
Loading…
Reference in New Issue
Block a user