Debian Codegraph @

debian/patches/0005-Move-defaultSignature-test-helper-to-common_test.go.patch

raw
1 From: Reinhard Tartler <[email protected]>
2 Date: Sun, 20 Sep 2026 19:00:28 -0400
3 Subject: Move defaultSignature test helper to common_test.go
4
5 Move defaultSignature from worktree_commit_test.go into common_test.go so
6 it remains accessible to other test suites in package git (such as
7 worktree_fs_test.go) even if worktree_commit_test.go is not compiled.
8
9 Forwarded: not-needed
10 Last-Update: 2026-09-20
11 ---
12 common_test.go | 9 +++++++++
13 worktree_commit_test.go | 9 ---------
14 2 files changed, 9 insertions(+), 9 deletions(-)
15
16 diff --git a/common_test.go b/common_test.go
17 index d1d368a..71895e3 100644
18 --- a/common_test.go
19 +++ b/common_test.go
20 @@ -248,3 +248,12 @@ func CommitNewFile(c *C, repo *Repository, fileName string) plumbing.Hash {
21
22 return sha
23 }
24 +
25 +func defaultSignature() *object.Signature {
26 + when, _ := time.Parse(object.DateFormat, "Thu May 04 00:03:43 2017 +0200")
27 + return &object.Signature{
28 + Name: "foo",
29 + Email: "[email protected]",
30 + When: when,
31 + }
32 +}
33 diff --git a/worktree_commit_test.go b/worktree_commit_test.go
34 index 5b2b356..01d31ab 100644
35 --- a/worktree_commit_test.go
36 +++ b/worktree_commit_test.go
37 @@ -687,15 +687,6 @@ func lenIterEncodedObjects(iter storer.EncodedObjectIter) int {
38 return count
39 }
40
41 -func defaultSignature() *object.Signature {
42 - when, _ := time.Parse(object.DateFormat, "Thu May 04 00:03:43 2017 +0200")
43 - return &object.Signature{
44 - Name: "foo",
45 - Email: "[email protected]",
46 - When: when,
47 - }
48 -}
49 -
50 func invalidSignature() *object.Signature {
51 when, _ := time.Parse(object.DateFormat, "Thu May 04 00:03:43 2017 +0200")
52 return &object.Signature{