1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Description: Skip TestGitRepoForPath when .git directory does not exist
This prevents Debian package build from failing.
Author: Anthony Fok <foka@debian.org>
Origin: vendor
Last-Update: 2021-12-06
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/gitcha_test.go
+++ b/gitcha_test.go
@@ -8,6 +8,9 @@
)
func TestGitRepoForPath(t *testing.T) {
+ if _, err := os.Stat(".git"); os.IsNotExist(err) {
+ t.Skip("No .git directory, skipping", t.Name())
+ }
abs, _ := filepath.Abs(".")
tt := []struct {
path string
|