Skip to content

Commit 440e80f

Browse files
committed
test: Add test for repository format version 1
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
1 parent fc39be5 commit 440e80f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

t/t7000-sparse-checkout.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,20 @@ test_expect_success 'Delete a patch' '
194194
clean_status
195195
'
196196

197+
cat > series-expected <<EOF
198+
+ patch1
199+
> patch2
200+
- patch0
201+
EOF
202+
test_expect_success 'Repository format version 1' '
203+
test "$(git config --get core.repositoryformatversion)" = "0" &&
204+
test "$(git config --get extensions.worktreeconfig)" = "true" &&
205+
test_config core.repositoryformatversion 1 &&
206+
stg series >series-out &&
207+
test_cmp series-expected series-out &&
208+
echo "more content" >> a/bar.txt &&
209+
stg refresh &&
210+
stg show
211+
'
212+
197213
test_done

0 commit comments

Comments
 (0)