Skip to content

Commit

Permalink
test: Add test for repository format version 1
Browse files Browse the repository at this point in the history
When core.repositoryformatversion=1 and extensions.worktreeconfig=true,
libgit2 will fail unless StGit initializes libgit2 to allow the
worktreeconfig extension. This test exersizes StGit in this scenario.

Refs: #195, #234
  • Loading branch information
jpgrayson committed Nov 17, 2022
1 parent fc39be5 commit 440e80f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions t/t7000-sparse-checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,20 @@ test_expect_success 'Delete a patch' '
clean_status
'

cat > series-expected <<EOF
+ patch1
> patch2
- patch0
EOF
test_expect_success 'Repository format version 1' '
test "$(git config --get core.repositoryformatversion)" = "0" &&
test "$(git config --get extensions.worktreeconfig)" = "true" &&
test_config core.repositoryformatversion 1 &&
stg series >series-out &&
test_cmp series-expected series-out &&
echo "more content" >> a/bar.txt &&
stg refresh &&
stg show
'

test_done

0 comments on commit 440e80f

Please sign in to comment.