-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Let's keep up with go-git bugfixes and update it.
- Latest version does not use
-tags norwfs, so it must be dropped fromMakefile. It will also require latest go-billy and go-billy-siva. I have tested this and it fails, so it might still need fixing on borges or go-git side storage/filesystem: avoid norwfs build flag go-git#864 - For Remote.Fetch: error on missing remote reference go-git#870 it will need the following following patch:
commit 12b1bd549630fb6f3ad2c7f22bdba1e55937534f
Author: Santiago M. Mola <[email protected]>
Date: Thu Aug 9 11:19:10 2018 +0200
test: ensure HEAD exists on fixtures
Newer git versions give an error when trying to fetch a refspec that
not use wildcard and does not match anything (as git itself does).
Borges always asks for HEAD explicitely, so we need to create it on
our fixtures.
Signed-off-by: Santiago M. Mola <[email protected]>
diff --git a/fixtures_test.go b/fixtures_test.go
index 119f6c1..a1e3cef 100644
--- a/fixtures_test.go
+++ b/fixtures_test.go
@@ -238,6 +238,17 @@ func (f *ChangesFixture) setReferences(r *git.Repository, refs []*model.Referenc
}
}
+ // If there is no explicit HEAD, set it to the first reference.
+ // This will avoid errors on missing HEAD, since borges expects HEAD to
+ // exist.
+ if _, err := r.Storer.Reference(plumbing.HEAD); err != nil {
+ err := r.Storer.SetReference(plumbing.NewSymbolicReference(
+ plumbing.HEAD, plumbing.ReferenceName(refs[0].Name)))
+ if err != nil {
+ return err
+ }
+ }
+
return nil
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request