···34 "taggername",
35 "taggeremail",
36 "taggerdate:unix",
37+ "contents:subject",
38+ "contents:body",
39+ "contents:signature",
40 }
4142 var outFormat strings.Builder
···97 taggerName := parts[5]
98 taggerEmail := parts[6]
99 taggerDate := parts[7]
100+ subject := parts[8]
101+ body := parts[9]
102+ signature := parts[10]
103+104+ // combine subject and body for the message
105+ var message string
106+ if subject != "" && body != "" {
107+ message = subject + "\n\n" + body
108+ } else if subject != "" {
109+ message = subject
110+ } else {
111+ message = body
112+ }
113114 // parse creation time
115 var createdAt time.Time
···134 Email: taggerEmail,
135 When: createdAt,
136 },
137+ Message: message,
138+ PGPSignature: signature,
139+ TargetType: typ,
140+ Target: plumbing.NewHash(targetHash),
141 }
142143 tags = append(tags, tag)
+1-1
knotserver/git/tag_test.go
···323 assert.Equal(s.T(), "Tagger One", v1Tag.Tagger.Name, "tagger name should match")
324 assert.Equal(s.T(), "tagger1@example.com", v1Tag.Tagger.Email, "tagger email should match")
325326- assert.Equal(s.T(), "Release version 1.0.0\n\nThis is the first stable release.",
327 v1Tag.Message, "tag message should match")
328329 assert.Equal(s.T(), plumbing.TagObject, v1Tag.TargetType,
···323 assert.Equal(s.T(), "Tagger One", v1Tag.Tagger.Name, "tagger name should match")
324 assert.Equal(s.T(), "tagger1@example.com", v1Tag.Tagger.Email, "tagger email should match")
325326+ assert.Equal(s.T(), "Release version 1.0.0\n\nThis is the first stable release.\n",
327 v1Tag.Message, "tag message should match")
328329 assert.Equal(s.T(), plumbing.TagObject, v1Tag.TargetType,