From c4fce1a218fd33938c0be90e939531c0a00ebf7f Mon Sep 17 00:00:00 2001 From: Carlos Martín Nieto Date: Sun, 15 Mar 2015 01:49:32 +0100 Subject: 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. --- reference_test.go | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'reference_test.go') 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: "random@hacker.com", - 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") -- cgit v1.2.3