aboutsummaryrefslogtreecommitdiff
path: root/lib/git/git_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-02-09 19:51:22 +0700
committerShulhan <ms@kilabit.info>2026-02-09 20:26:34 +0700
commit9569814020e7122b61d88fa4afd39989e2bfcfb2 (patch)
tree41aab827a46402022ba7487772d394a235542d55 /lib/git/git_test.go
parent1e9c2f8044c842b8f9287fa50e1072406aa9fa40 (diff)
downloadpakakeh.go-9569814020e7122b61d88fa4afd39989e2bfcfb2.tar.xz
lib/git: skip test LogFollow when repository is shallow cloned
In CI, the repository is cloned with depth=1, while test for LogFollow compare the last 3 commits. This cause the test on LogFollow fail in CI environment.
Diffstat (limited to 'lib/git/git_test.go')
-rw-r--r--lib/git/git_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/git/git_test.go b/lib/git/git_test.go
index 92daa143..3184fb72 100644
--- a/lib/git/git_test.go
+++ b/lib/git/git_test.go
@@ -212,6 +212,14 @@ func TestGit_LogFollow(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+ logs, err := agit.LogFollow(`.`, ``)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if len(logs) <= 1 {
+ t.Skip(`Repository is shallow cloned.`)
+ return
+ }
listCase := []struct {
path string
expError string