Skip to content

Commit

Permalink
Add reftable test
Browse files Browse the repository at this point in the history
  • Loading branch information
DianaNites committed Feb 1, 2025
1 parent aa05ef0 commit 766526c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gix-discover/tests/discover/is_git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,11 @@ fn split_worktree_using_configuration() -> crate::Result {
}
Ok(())
}

#[test]
fn reftable() -> crate::Result {
let repo = gix_testtools::scripted_fixture_read_only("make_reftable_repo.sh")?.join("reftable-clone");
let kind = gix_discover::is_git(&repo)?;
assert_eq!(kind, gix_discover::repository::Kind::WorkTree { linked_git_dir: None });
Ok(())
}
Binary file not shown.
13 changes: 13 additions & 0 deletions gix-discover/tests/fixtures/make_reftable_repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -eu -o pipefail

git init -q

git checkout -b main
touch this
git add this
git commit -q -m c1
echo hello >> this
git commit -q -am c2

git clone --ref-format=reftable . reftable-clone

0 comments on commit 766526c

Please sign in to comment.