diff options
| author | Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> | 2016-02-22 11:42:44 -0300 |
|---|---|---|
| committer | Andrew Gerrand <adg@golang.org> | 2016-02-26 02:15:21 +0000 |
| commit | b356792b0438274f1abae46e11c9b3397f5c233b (patch) | |
| tree | bc7563b8cd4f91ecaef2898d16ce73e61ee4ae96 /git-codereview/branch.go | |
| parent | 28658025cb75e5eb09b6c1033244e012dfcec37a (diff) | |
| download | go-x-review-b356792b0438274f1abae46e11c9b3397f5c233b.tar.xz | |
git-codereview: reject empty commits in mail
Fixes golang/go#10753.
Change-Id: I224a411177b3d198576a06bc69da9894b7b67c34
Reviewed-on: https://go-review.googlesource.com/19799
Run-TryBot: Andrew Gerrand <adg@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'git-codereview/branch.go')
| -rw-r--r-- | git-codereview/branch.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/git-codereview/branch.go b/git-codereview/branch.go index 5ba9d35..8cf1566 100644 --- a/git-codereview/branch.go +++ b/git-codereview/branch.go @@ -355,6 +355,11 @@ func (b *Branch) DefaultCommit(action string) *Commit { return work[0] } +// ListFiles returns the list of files in a given commit. +func ListFiles(c *Commit) []string { + return nonBlankLines(cmdOutput("git", "diff", "--name-only", c.Parent, c.Hash, "--")) +} + func cmdBranchpoint(args []string) { expectZeroArgs(args, "sync") fmt.Fprintf(stdout(), "%s\n", CurrentBranch().Branchpoint()) |
