aboutsummaryrefslogtreecommitdiff
path: root/git-codereview/branch.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-01-13 18:55:18 -0500
committerRuss Cox <rsc@golang.org>2015-01-14 04:14:12 +0000
commite60b08421f15d8e7ec1c00d52dec8e48f029ea4a (patch)
treec73344b02d89648e0bc5685c35b817b715bbf677 /git-codereview/branch.go
parent8c348adcde5327dca3eca9c5e6cf61f7118493cc (diff)
downloadgo-x-review-e60b08421f15d8e7ec1c00d52dec8e48f029ea4a.tar.xz
git-codereview: add branchpoint command, for scripts
The most important use of this is git rebase -i $(git codereview branchpoint) in multichange clients. Change-Id: I6bdbc02db2e2823e837159efec20ad5c9046bcd5 Reviewed-on: https://go-review.googlesource.com/2783 Reviewed-by: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'git-codereview/branch.go')
-rw-r--r--git-codereview/branch.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-codereview/branch.go b/git-codereview/branch.go
index 1aa5427..cdec9c3 100644
--- a/git-codereview/branch.go
+++ b/git-codereview/branch.go
@@ -316,3 +316,8 @@ func (b *Branch) DefaultCommit(action string) *Commit {
}
return work[0]
}
+
+func branchpoint(args []string) {
+ expectZeroArgs(args, "sync")
+ fmt.Fprintf(stdout(), "%s\n", CurrentBranch().Branchpoint())
+}