Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit b2edb6d

Browse files
committed
git: Remove old hash validation code
This will not work for a signed commit as with the GPG signature being a part of the commit, the hash is now non-deterministic. Verification of the commit is done through the validation of the signature. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
1 parent c9b2eac commit b2edb6d

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

worktree_commit_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ func (s *WorktreeSuite) TestRemoveAndCommitAll(c *C) {
140140
}
141141

142142
func (s *WorktreeSuite) TestCommitSign(c *C) {
143-
// expectedHash := plumbing.NewHash("98c4ac7c29c913f7461eae06e024dc18e80d23a4")
144-
145143
fs := memfs.New()
146144
storage := memory.NewStorage()
147145

@@ -158,11 +156,8 @@ func (s *WorktreeSuite) TestCommitSign(c *C) {
158156

159157
key := commitSignKey(c)
160158
hash, err := w.Commit("foo\n", &CommitOptions{Author: defaultSignature(), SignKey: key})
161-
// c.Assert(hash, Equals, expectedHash)
162159
c.Assert(err, IsNil)
163160

164-
// assertStorageStatus(c, r, 1, 1, 1, expectedHash)
165-
166161
// Verify the commit.
167162
pks := new(bytes.Buffer)
168163
pkw, err := armor.Encode(pks, openpgp.PublicKeyType, nil)

0 commit comments

Comments
 (0)