diff options
| author | Paul Jolly <paul@myitcv.io> | 2020-05-11 06:16:42 +0100 |
|---|---|---|
| committer | Paul Jolly <paul@myitcv.org.uk> | 2020-05-15 04:49:42 +0000 |
| commit | a2b90d2f6e29477343826a7b79798b588394f4aa (patch) | |
| tree | 9b1e2d3673716948e7051839e2eba4b1e1d970a0 /git-codereview/mail.go | |
| parent | 180dd7fcad2ad38f8a3b778687cac4c1a5ca7627 (diff) | |
| download | go-x-review-a2b90d2f6e29477343826a7b79798b588394f4aa.tar.xz | |
git-codereview: add -wip flag to mail command
Add a -wip flag to the mail command to set the status of a change to
work-in-progress. Per:
https://gerrit-review.googlesource.com/Documentation/intro-user.html#wip
Fixes golang/go#20991
Change-Id: I227beccb55570949e9b0f487d5394855611a118a
Reviewed-on: https://go-review.googlesource.com/c/review/+/233237
Reviewed-by: Daniel Martà <mvdan@mvdan.cc>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Diffstat (limited to 'git-codereview/mail.go')
| -rw-r--r-- | git-codereview/mail.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/git-codereview/mail.go b/git-codereview/mail.go index fd663af..52ef44a 100644 --- a/git-codereview/mail.go +++ b/git-codereview/mail.go @@ -18,6 +18,7 @@ func cmdMail(args []string) { var ( diff = flags.Bool("diff", false, "show change commit diff and don't upload or mail") force = flags.Bool("f", false, "mail even if there are staged changes") + wip = flags.Bool("wip", false, "set the status of a change to Work-in-Progress") topic = flags.String("topic", "", "set Gerrit topic") trybot = flags.Bool("trybot", false, "run trybots on the uploaded CLs") rList = new(stringList) // installed below @@ -30,7 +31,7 @@ func cmdMail(args []string) { flags.Var(tagList, "hashtag", "comma-separated list of tags to set") flags.Usage = func() { - fmt.Fprintf(stderr(), "Usage: %s mail %s [-r reviewer,...] [-cc mail,...] [-nokeycheck] [-topic topic] [-trybot] [commit]\n", os.Args[0], globalFlags) + fmt.Fprintf(stderr(), "Usage: %s mail %s [-r reviewer,...] [-cc mail,...] [-nokeycheck] [-topic topic] [-trybot] [-wip] [commit]\n", os.Args[0], globalFlags) } flags.Parse(args) if len(flags.Args()) > 1 { @@ -136,6 +137,10 @@ func cmdMail(args []string) { refSpec += start + "l=Run-TryBot" start = "," } + if *wip { + refSpec += start + "wip" + start = "," + } args = []string{"push", "-q"} if *noKeyCheck { args = append(args, "-o", "nokeycheck") |
