From fdc5e6a4e6b93c6381d20cf1dfbfaa49f420a43d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 7 Jan 2021 12:26:06 -0500 Subject: git-codereview: add reword command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quoting the new docs: The reword command edits pending commit messages. git codereview reword [commit...] Reword opens the editor on the commit message for each named commit in turn. When all the editing is finished, it applies the changes to the pending commits. If no commit is listed, reword applies to the most recent pending commit. Reword is similar in effect to running “git codereview rebase-work” and changing the script action for the named commits to “reword”, or (with no arguments) to “git commit --amend”, but it only affects the commit messages, not the state of the git staged index, nor any checked-out files. This more careful implementation makes it safe to use when there are local changes or, for example, when tests are running that would be broken by temporary changes to the checked-out tree, as would happen during “git codereview rebase-work”. Change-Id: I38ac939b8530bf237c6cafb911f2b17d22eaca60 Reviewed-on: https://go-review.googlesource.com/c/review/+/279718 Trust: Russ Cox Reviewed-by: Matthew Dempsky --- git-codereview/mail.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-codereview/mail.go') diff --git a/git-codereview/mail.go b/git-codereview/mail.go index 3b60eb3..b7fc9f9 100644 --- a/git-codereview/mail.go +++ b/git-codereview/mail.go @@ -59,7 +59,7 @@ func cmdMail(args []string) { return } - if len(ListFiles(c)) == 0 && c.Merge == "" { + if len(ListFiles(c)) == 0 && len(c.Parents) == 1 { dief("cannot mail: commit %s is empty", c.ShortHash) } -- cgit v1.3