aboutsummaryrefslogtreecommitdiffstats
path: root/commands/show.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-12-27 21:53:48 +0100
committerGitHub <noreply@github.com>2018-12-27 21:53:48 +0100
commit171acad6194dc1ceecca36d3d50795d5c84985d1 (patch)
tree59ac2fd7dfdc801b434cf41478a1933a4a8423e1 /commands/show.go
parent3f694195f86f22ac10e04bf0f0f70535fa30a4a0 (diff)
parent11e04748b93621a7d377d3163381ff1f38e5fdbe (diff)
downloadgit-bug-171acad6194dc1ceecca36d3d50795d5c84985d1.tar.gz
Merge pull request #84 from Steap/allow-empty-comment-message
Allow empty messages in comments.
Diffstat (limited to 'commands/show.go')
-rw-r--r--commands/show.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/commands/show.go b/commands/show.go
index 86c01a17..935f617c 100644
--- a/commands/show.go
+++ b/commands/show.go
@@ -58,6 +58,7 @@ func runShowBug(cmd *cobra.Command, args []string) error {
indent := " "
for i, comment := range snapshot.Comments {
+ var message string
fmt.Printf("%s#%d %s <%s>\n\n",
indent,
i,
@@ -65,9 +66,15 @@ func runShowBug(cmd *cobra.Command, args []string) error {
comment.Author.Email,
)
+ if comment.Message == "" {
+ message = colors.GreyBold("No description provided.")
+ } else {
+ message = comment.Message
+ }
+
fmt.Printf("%s%s\n\n\n",
indent,
- comment.Message,
+ message,
)
}