aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt T. Proud <matt.proud@gmail.com>2025-07-04 20:03:02 +0200
committerGopher Robot <gobot@golang.org>2025-07-09 08:35:44 -0700
commit48aa97b42827239f9fd02d1b5ad75adc200c7a72 (patch)
tree60f37a646805ad81076b21ed4e0b1281dcc4524b
parentc4af2b031e13e282462ea8ae4311bfabe115ae9d (diff)
downloadgo-x-review-48aa97b42827239f9fd02d1b5ad75adc200c7a72.tar.xz
git-codereview: frame sync as git codereview syncv1.16.0
The codereview binary referred to the sync subcommand as merely "git sync" in a number of places in user surfaces. This was wrong and misleading, so the code now refers to it with the codereview parent subcommand in the name (i.e., a "git codereview sync"). Change-Id: Icf3f96a8c76b57319bc3101b3e9fd0cbd8cecea9 Reviewed-on: https://go-review.googlesource.com/c/review/+/685855 Auto-Submit: Sean Liao <sean@liao.dev> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: David Chase <drchase@google.com>
-rw-r--r--git-codereview/change.go4
-rw-r--r--git-codereview/review.go4
-rw-r--r--git-codereview/submit.go4
-rw-r--r--git-codereview/sync.go2
4 files changed, 7 insertions, 7 deletions
diff --git a/git-codereview/change.go b/git-codereview/change.go
index 65f503f..06b658f 100644
--- a/git-codereview/change.go
+++ b/git-codereview/change.go
@@ -184,10 +184,10 @@ func checkoutOrCreate(target string) {
origin := b.OriginBranch()
// NOTE: This is different from git checkout -q -t -b origin,
- // because the -t wold use the origin directly, and that may be
+ // because the -t would use the origin directly, and that may be
// ahead of the current directory. The goal of this command is
// to create a new branch for work on the current directory,
- // not to incorporate new commits at the same time (use 'git sync' for that).
+ // not to incorporate new commits at the same time (use 'git codereview sync' for that).
// The ideal is that HEAD doesn't change at all.
// In the absence of pending commits, that ideal is achieved.
// But if there are pending commits, it'd be too confusing to have them
diff --git a/git-codereview/review.go b/git-codereview/review.go
index 795cc80..ad0632a 100644
--- a/git-codereview/review.go
+++ b/git-codereview/review.go
@@ -251,9 +251,9 @@ func cmdOutputErr(command string, args ...string) (string, error) {
// should be run using runDirErr so that the -v and -n flags apply to them.
func cmdOutputDirErr(dir, command string, args ...string) (string, error) {
// NOTE: We only show these non-state-modifying commands with -v -v.
- // Otherwise things like 'git sync -v' show all our internal "find out about
+ // Otherwise things like 'git codereview sync -v' show all our internal "find out about
// the git repo" commands, which is confusing if you are just trying to find
- // out what git sync means.
+ // out what git codereview sync means.
if *verbose > 1 {
start := time.Now()
defer func() {
diff --git a/git-codereview/submit.go b/git-codereview/submit.go
index ce629c3..6cfb809 100644
--- a/git-codereview/submit.go
+++ b/git-codereview/submit.go
@@ -59,7 +59,7 @@ func cmdSubmit(args []string) {
}
// Sync client to revision that Gerrit committed, but only if we can do it cleanly.
- // Otherwise require user to run 'git sync' themselves (if they care).
+ // Otherwise require user to run 'git codereview sync' themselves (if they care).
run("git", "fetch", "-q")
if len(cs) == 1 && len(b.Pending()) == 1 {
if err := runErr("git", "checkout", "-q", "-B", b.Name, g.CurrentRevision, "--"); err != nil {
@@ -166,7 +166,7 @@ func submitCheck(g *GerritChange) error {
// Not yet "MERGED", so try the submit.
// "SUBMITTED" is a weird state. It means that Submit has been clicked once,
// but it hasn't happened yet, usually because of a merge failure.
- // The user may have done git sync and may now have a mergable
+ // The user may have done git codereview sync and may now have a mergable
// copy waiting to be uploaded, so continue on as if it were "NEW".
case "MERGED":
diff --git a/git-codereview/sync.go b/git-codereview/sync.go
index 7b8fe26..71fc312 100644
--- a/git-codereview/sync.go
+++ b/git-codereview/sync.go
@@ -49,7 +49,7 @@ func cmdSync(args []string) {
checkUnstaged("sync")
// Pull remote changes into local branch.
- // We do this in one command so that people following along with 'git sync -v'
+ // We do this in one command so that people following along with 'git codereview sync -v'
// see fewer commands to understand.
// We want to pull in the remote changes from the upstream branch
// and rebase the current pending commit (if any) on top of them.