From: Reinhard Tartler Date: Sun, 20 Sep 2026 19:00:28 -0400 Subject: Move defaultSignature test helper to common_test.go Move defaultSignature from worktree_commit_test.go into common_test.go so it remains accessible to other test suites in package git (such as worktree_fs_test.go) even if worktree_commit_test.go is not compiled. Forwarded: not-needed Last-Update: 2026-09-20 --- common_test.go | 9 +++++++++ worktree_commit_test.go | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common_test.go b/common_test.go index d1d368a..71895e3 100644 --- a/common_test.go +++ b/common_test.go @@ -248,3 +248,12 @@ func CommitNewFile(c *C, repo *Repository, fileName string) plumbing.Hash { return sha } + +func defaultSignature() *object.Signature { + when, _ := time.Parse(object.DateFormat, "Thu May 04 00:03:43 2017 +0200") + return &object.Signature{ + Name: "foo", + Email: "foo@foo.foo", + When: when, + } +} diff --git a/worktree_commit_test.go b/worktree_commit_test.go index 5b2b356..01d31ab 100644 --- a/worktree_commit_test.go +++ b/worktree_commit_test.go @@ -687,15 +687,6 @@ func lenIterEncodedObjects(iter storer.EncodedObjectIter) int { return count } -func defaultSignature() *object.Signature { - when, _ := time.Parse(object.DateFormat, "Thu May 04 00:03:43 2017 +0200") - return &object.Signature{ - Name: "foo", - Email: "foo@foo.foo", - When: when, - } -} - func invalidSignature() *object.Signature { when, _ := time.Parse(object.DateFormat, "Thu May 04 00:03:43 2017 +0200") return &object.Signature{