summaryrefslogtreecommitdiff
path: root/t/t1405-main-ref-store.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1405-main-ref-store.sh')
-rwxr-xr-xt/t1405-main-ref-store.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh
index a237d9880e..49718b7ea7 100755
--- a/t/t1405-main-ref-store.sh
+++ b/t/t1405-main-ref-store.sh
@@ -9,12 +9,18 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
RUN="test-tool ref-store main"
-test_expect_success 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' '
- test_commit one &&
+
+test_expect_success 'setup' '
+ test_commit one
+'
+
+test_expect_success REFFILES 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' '
N=`find .git/refs -type f | wc -l` &&
test "$N" != 0 &&
- $RUN pack-refs 3 &&
- N=`find .git/refs -type f | wc -l`
+ ALL_OR_PRUNE_FLAG=3 &&
+ $RUN pack-refs ${ALL_OR_PRUNE_FLAG} &&
+ N=`find .git/refs -type f` &&
+ test -z "$N"
'
test_expect_success 'create_symref(FOO, refs/heads/main)' '
@@ -98,12 +104,12 @@ test_expect_success 'reflog_exists(HEAD)' '
test_expect_success 'delete_reflog(HEAD)' '
$RUN delete-reflog HEAD &&
- ! test -f .git/logs/HEAD
+ test_must_fail git reflog exists HEAD
'
test_expect_success 'create-reflog(HEAD)' '
$RUN create-reflog HEAD 1 &&
- test -f .git/logs/HEAD
+ git reflog exists HEAD
'
test_expect_success 'delete_ref(refs/heads/foo)' '