From 9569814020e7122b61d88fa4afd39989e2bfcfb2 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Mon, 9 Feb 2026 19:51:22 +0700 Subject: 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. --- lib/git/git_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v1.3