aboutsummaryrefslogtreecommitdiff
path: root/git-codereview/sync.go
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2021-05-11 17:07:33 -0400
committerCherry Mui <cherryyz@google.com>2024-04-03 20:29:03 +0000
commitc91ae924997076a8e6e6f16d1d9fb75f812e0cdd (patch)
tree4c0a5cea9e3bf67b3fa820a95d6909e6e5450de7 /git-codereview/sync.go
parent38b40c0e2b9e3a62d9a99d62fa70595a5f68e6c9 (diff)
downloadgo-x-review-1.11.0.tar.xz
git-codereview: use --no-ff for sync-branchv1.11.0
When working with dev branches, it is possible that a branch needed to be sync'd can be fast-forworded. For example, there is no new commit since the last sync. Or this could happen with multi-release-cycle branches, where we reverse-sync'd to master for one release cycle, later try to sync master to branch for the next cycle. Fast-forwording is generally not what we want (and it confuses the git-codereview tool when trying to craft the CL description). Pass --no-ff to ensure we create a merge commit. Change-Id: Ic204882d0304ec538c2e219d34e370ba98db9374 Reviewed-on: https://go-review.googlesource.com/c/review/+/319069 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'git-codereview/sync.go')
-rw-r--r--git-codereview/sync.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-codereview/sync.go b/git-codereview/sync.go
index db6650e..c60d04c 100644
--- a/git-codereview/sync.go
+++ b/git-codereview/sync.go
@@ -240,7 +240,7 @@ func cmdSyncBranch(args []string) {
run("git", "reset", "--hard", "origin/"+parent)
_, err = cmdOutputErr("git", "merge", "--no-ff", "origin/"+branch)
} else {
- _, err = cmdOutputErr("git", "merge", "origin/"+parent)
+ _, err = cmdOutputErr("git", "merge", "--no-ff", "origin/"+parent)
}
// Resolve codereview.cfg the right way - never take it from the merge.