diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2021-10-26 12:17:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-26 12:17:29 +0200 |
commit | 243e7c801995fa0146b3564f41321ca234a8b1d2 (patch) | |
tree | c079f086ba23a21cd68ade66d784b9a1202f55ba /common_test.go | |
parent | 4ec1753b4e9324d455d3b55060020ce324e6ced2 (diff) | |
parent | 5340c58e393abecadb651e5f7ef43a66ce34ac88 (diff) | |
download | go-git-243e7c801995fa0146b3564f41321ca234a8b1d2.tar.gz |
Merge pull request #385 from john-cai/add-follow-tags
git: add --follow-tags option for pushes
Diffstat (limited to 'common_test.go')
-rw-r--r-- | common_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common_test.go b/common_test.go index 5f5bc4c..b47f5bb 100644 --- a/common_test.go +++ b/common_test.go @@ -198,3 +198,11 @@ func AssertReferences(c *C, r *Repository, expected map[string]string) { c.Assert(obtained, DeepEquals, expected) } } + +func AssertReferencesMissing(c *C, r *Repository, expected []string) { + for _, name := range expected { + _, err := r.Reference(plumbing.ReferenceName(name), false) + c.Assert(err, NotNil) + c.Assert(err, Equals, plumbing.ErrReferenceNotFound) + } +} |