diff options
| author | Jean de Klerk <deklerk@google.com> | 2018-04-17 20:53:24 -0700 |
|---|---|---|
| committer | Yury Smolsky <yury@smolsky.by> | 2018-11-08 09:10:10 +0000 |
| commit | 22b85151af96692018cffaacf6156c88d2b0c933 (patch) | |
| tree | e665a93fb59bfa4ec5985a82a9d6b39cbf4c33f0 /git-codereview/doc.go | |
| parent | 5745d819bd5fea5cbfb6ef4886a39b7f814c14db (diff) | |
| download | go-x-review-22b85151af96692018cffaacf6156c88d2b0c933.tar.xz | |
git-codereview: add -m option
The -m option allows a user to specify an inline commit
message. This is useful for a few reasons; primary among
them are the ability to easily automate a `git change`
flow (e.g. in a CI/CD workflow) and the ease of creating
one-liner commits (e.g. "regen protos").
Fixes golang/go#24912
Change-Id: Ie06886c74552ec615623c2faac285a1896bdac06
Reviewed-on: https://go-review.googlesource.com/c/107625
Run-TryBot: Yury Smolsky <yury@smolsky.by>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Yury Smolsky <yury@smolsky.by>
Reviewed-by: Daniel Martà <mvdan@mvdan.cc>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Diffstat (limited to 'git-codereview/doc.go')
| -rw-r--r-- | git-codereview/doc.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/git-codereview/doc.go b/git-codereview/doc.go index 5b87283..7624909 100644 --- a/git-codereview/doc.go +++ b/git-codereview/doc.go @@ -120,7 +120,7 @@ Change The change command creates and moves between Git branches and maintains the pending changes on work branches. - git codereview change [-a] [-q] [branchname] + git codereview change [-a] [-q] [-m <message>] [branchname] Given a branch name as an argument, the change command switches to the named branch, creating it if necessary. If the branch is created and there are staged @@ -132,10 +132,16 @@ staged changes in the current branch or, if there is already a pending change, amends that change. The -q option skips the editing of an extant pending change's commit message. +If -m is present, -q is ignored. The -a option automatically adds any unstaged edits in tracked files during commit; it is equivalent to the 'git commit' -a option. +The -m option specifies a commit message and skips the editor prompt. This +option is only useful when creating commits (e.g. if there are unstaged +changes). If a commit already exists, it is overwritten. If -q is also +present, -q will be ignored. + Gofmt The gofmt command applies the gofmt program to all files modified in the |
