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

plumbing: object/tag, add signature and verification support #658

Merged
merged 3 commits into from
Nov 24, 2017

Conversation

darkowlzz
Copy link
Contributor

No description provided.

signature := strings.NewReader(t.PGPSignature)

// Remove signature. Keep only the tag components.
t.PGPSignature = ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here and in Commit.Verify we should avoid mutating the object in this method. Maybe we should extract a new method Tag.encode(o plumbing.EncodedObject, includeSig bool) which we can call from here and Tag.Encode with different parameters.

Adds Commit.encode() and Tag.encode() with optional `includeSig`
parameter to include or exclude signature from the encoded object.
@darkowlzz
Copy link
Contributor Author

I think here and in Commit.Verify we should avoid mutating the object in this method. Maybe we should extract a new method Tag.encode(o plumbing.EncodedObject, includeSig bool) which we can call from here and Tag.Encode with different parameters.

@orirawlings Sounds good. I've added method encode() to both Commit and Tag, which accepts an extra includeSig parameter to include or exclude signature.

ferhatelmas added a commit to ferhatelmas/go-git that referenced this pull request Nov 24, 2017
@orirawlings orirawlings merged commit da62c67 into src-d:master Nov 24, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants