summaryrefslogtreecommitdiff
path: root/reference_test.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2015-03-15 01:49:32 +0100
committerCarlos Martín Nieto <[email protected]>2015-03-15 01:49:32 +0100
commitc4fce1a218fd33938c0be90e939531c0a00ebf7f (patch)
tree40cf7f6c0331050db5f841ddfd6738951f482f66 /reference_test.go
parent050e6fbc49ac1a173af5e3462b3c2d330cadd113 (diff)
Update to libgit2 d675982a153
There's been some changes to the checkout strategy, especially the SAFE_CREATE mode, which is now the RECREATE_MISSING flag, though that shouldn't be necessary to use in the general case. The largest changes come from the removal of the signture from ref-modifying functions/methods and the removal of the reflog string in all but those directly related to moving references.
Diffstat (limited to 'reference_test.go')
-rw-r--r--reference_test.go21
1 files changed, 7 insertions, 14 deletions
diff --git a/reference_test.go b/reference_test.go
index c7d52fb..562e276 100644
--- a/reference_test.go
+++ b/reference_test.go
@@ -14,14 +14,7 @@ func TestRefModification(t *testing.T) {
commitId, treeId := seedTestRepo(t, repo)
- loc, err := time.LoadLocation("Europe/Berlin")
- checkFatal(t, err)
- sig := &Signature{
- Name: "Rand Om Hacker",
- Email: "[email protected]",
- When: time.Date(2013, 03, 06, 14, 30, 0, 0, loc),
- }
- _, err = repo.CreateReference("refs/tags/tree", treeId, true, sig, "testTreeTag")
+ _, err := repo.CreateReference("refs/tags/tree", treeId, true, "testTreeTag")
checkFatal(t, err)
tag, err := repo.LookupReference("refs/tags/tree")
@@ -52,7 +45,7 @@ func TestRefModification(t *testing.T) {
t.Fatalf("Wrong ref target")
}
- _, err = tag.Rename("refs/tags/renamed", false, nil, "")
+ _, err = tag.Rename("refs/tags/renamed", false, "")
checkFatal(t, err)
tag, err = repo.LookupReference("refs/tags/renamed")
checkFatal(t, err)
@@ -85,13 +78,13 @@ func TestReferenceIterator(t *testing.T) {
commitId, err := repo.CreateCommit("HEAD", sig, sig, message, tree)
checkFatal(t, err)
- _, err = repo.CreateReference("refs/heads/one", commitId, true, sig, "headOne")
+ _, err = repo.CreateReference("refs/heads/one", commitId, true, "headOne")
checkFatal(t, err)
- _, err = repo.CreateReference("refs/heads/two", commitId, true, sig, "headTwo")
+ _, err = repo.CreateReference("refs/heads/two", commitId, true, "headTwo")
checkFatal(t, err)
- _, err = repo.CreateReference("refs/heads/three", commitId, true, sig, "headThree")
+ _, err = repo.CreateReference("refs/heads/three", commitId, true, "headThree")
checkFatal(t, err)
iter, err := repo.NewReferenceIterator()
@@ -143,7 +136,7 @@ func TestReferenceOwner(t *testing.T) {
defer os.RemoveAll(repo.Workdir())
commitId, _ := seedTestRepo(t, repo)
- ref, err := repo.CreateReference("refs/heads/foo", commitId, true, nil, "")
+ ref, err := repo.CreateReference("refs/heads/foo", commitId, true, "")
checkFatal(t, err)
owner := ref.Owner()
@@ -162,7 +155,7 @@ func TestUtil(t *testing.T) {
commitId, _ := seedTestRepo(t, repo)
- ref, err := repo.CreateReference("refs/heads/foo", commitId, true, nil, "")
+ ref, err := repo.CreateReference("refs/heads/foo", commitId, true, "")
checkFatal(t, err)
ref2, err := repo.DwimReference("foo")