aboutsummaryrefslogtreecommitdiff
path: root/git-codereview/pending.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2021-02-17 10:23:46 -0500
committerRuss Cox <rsc@golang.org>2021-02-23 10:45:24 +0000
commit2465c8e799238385f42c2e82d9f37a301cb066d0 (patch)
treef52beb0e04f63ba404daa44f7577dc501ff0423c /git-codereview/pending.go
parent19899311a872616f0eb00d6eadccc1109d9047d3 (diff)
downloadgo-x-review-2465c8e799238385f42c2e82d9f37a301cb066d0.tar.xz
git-codereview: pending: show unresolved comment count
Also fix a potential crash parsing a commit with no parents. Change-Id: I1c289dde45230a3362f54037ea18023278b05ffd Reviewed-on: https://go-review.googlesource.com/c/review/+/294129 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'git-codereview/pending.go')
-rw-r--r--git-codereview/pending.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-codereview/pending.go b/git-codereview/pending.go
index 3ed50ec..c9b99e7 100644
--- a/git-codereview/pending.go
+++ b/git-codereview/pending.go
@@ -332,6 +332,9 @@ func formatCommit(w io.Writer, c *Commit, short bool) {
}
tags = append(tags, "merge="+strings.Join(h, ","))
}
+ if g.UnresolvedCommentCount > 0 {
+ tags = append(tags, fmt.Sprintf("%d unresolved comments", g.UnresolvedCommentCount))
+ }
if len(tags) > 0 {
fmt.Fprintf(w, " (%s)", strings.Join(tags, ", "))
}