diff options
| author | Shulhan <ms@kilabit.info> | 2026-02-09 19:51:22 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-02-09 20:26:34 +0700 |
| commit | 9569814020e7122b61d88fa4afd39989e2bfcfb2 (patch) | |
| tree | 41aab827a46402022ba7487772d394a235542d55 /lib | |
| parent | 1e9c2f8044c842b8f9287fa50e1072406aa9fa40 (diff) | |
| download | pakakeh.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')
| -rw-r--r-- | lib/git/git_test.go | 8 |
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 |
