diff options
Diffstat (limited to 'git-codereview/change.go')
| -rw-r--r-- | git-codereview/change.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/git-codereview/change.go b/git-codereview/change.go index 045fe9c..3bdcd75 100644 --- a/git-codereview/change.go +++ b/git-codereview/change.go @@ -16,12 +16,14 @@ import ( var commitMsg string var changeAuto bool var changeQuick bool +var changeSignoff bool func cmdChange(args []string) { // NOTE: New flags should be added to the usage message below as well as doc.go. flags.StringVar(&commitMsg, "m", "", "specify a commit message") flags.BoolVar(&changeAuto, "a", false, "add changes to any tracked files") flags.BoolVar(&changeQuick, "q", false, "do not edit pending commit msg") + flags.BoolVar(&changeSignoff, "s", false, "add a Signed-off-by trailer at the end of the commit message") flags.Parse(args) if len(flags.Args()) > 1 { fmt.Fprintf(stderr(), "Usage: %s change %s [-a] [-m msg] [-q] [branch]\n", progName, globalFlags) @@ -100,6 +102,9 @@ func commitChanges(amend bool) { if changeAuto { args = append(args, "-a") } + if changeSignoff { + args = append(args, "-s") + } run("git", args...) } commit(amend) |
