aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plumbing/object/tag.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/plumbing/object/tag.go b/plumbing/object/tag.go
index 905206b..6354973 100644
--- a/plumbing/object/tag.go
+++ b/plumbing/object/tag.go
@@ -195,13 +195,9 @@ func (t *Tag) encode(o plumbing.EncodedObject, includeSig bool) (err error) {
return err
}
- if t.PGPSignature != "" && includeSig {
- // Split all the signature lines and write with a newline at the end.
- lines := strings.Split(t.PGPSignature, "\n")
- for _, line := range lines {
- if _, err = fmt.Fprintf(w, "%s\n", line); err != nil {
- return err
- }
+ if includeSig {
+ if _, err = fmt.Fprint(w, "\n"+t.PGPSignature); err != nil {
+ return err
}
}