<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go-x-review/git-codereview/sync.go, branch main</title>
<subtitle>Fork of golang.org/x/review with my patches.</subtitle>
<id>http://git.kilabit.info/go-x-review/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/go-x-review/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-review/'/>
<updated>2026-04-09T15:20:06Z</updated>
<entry>
<title>git-codereview: support remote other than "origin"</title>
<updated>2026-04-09T15:20:06Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2024-07-20T20:48:32Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-review/commit/?id=31f678e5a420fecf567c30bc66e40b43ad85fd17'/>
<id>urn:sha1:31f678e5a420fecf567c30bc66e40b43ad85fd17</id>
<content type='text'>
For the git-codereview commands to works on any Go's repositories, the
remote name for "origin" must be pointed to the Go original repository URL
(in most cases the one with go.googlesource.com domain).

The problem is when the "origin" is from the fork, all of the
git-codereview commands then will not works.

For example, in computer X, I clone the this repository from
"https://go.googlesource.com/review" (the origin) and then push my
changes on "git@git.sr.ht:~shulhan/go-x-review" (the fork).
In another computer Y, I then clone from the fork to continue my works.
The fork become origin.

One of the solution is to rename the remote names manually each time we
clone the fork.
The only cons using this solution is every time new branch created we need
to remember to pass "--set-upstream" during git push.

This changes introduce "remote" configuration in codereview.cfg.
When one first working on fork of Go repository, they set the "remote"
key, commit it, and push it.
When they cloned the fork, they did not needs to changes anything except
adding new remote using the pre-defined name.

Change-Id: I335d08fd8b7efe17ba07b3c0a3794f9ccf59b339
</content>
</entry>
<entry>
<title>git-codereview: frame sync as git codereview sync</title>
<updated>2025-07-09T15:35:44Z</updated>
<author>
<name>Matt T. Proud</name>
<email>matt.proud@gmail.com</email>
</author>
<published>2025-07-04T18:03:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-review/commit/?id=48aa97b42827239f9fd02d1b5ad75adc200c7a72'/>
<id>urn:sha1:48aa97b42827239f9fd02d1b5ad75adc200c7a72</id>
<content type='text'>
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 &lt;sean@liao.dev&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
Reviewed-by: Sean Liao &lt;sean@liao.dev&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
</content>
</entry>
<entry>
<title>git-codereview: explicitly include the codereview subcommand in suggested commands</title>
<updated>2025-06-17T17:40:36Z</updated>
<author>
<name>Adam Bender</name>
<email>abender@gmail.com</email>
</author>
<published>2025-06-12T02:12:34Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-review/commit/?id=c4af2b031e13e282462ea8ae4311bfabe115ae9d'/>
<id>urn:sha1:c4af2b031e13e282462ea8ae4311bfabe115ae9d</id>
<content type='text'>
If a user does not have the recommended aliases in their .gitconfig, the suggested
command will not work. Several suggestions have the codereview subcommand already;
this change updates all suggestions to include it.

Change-Id: I3613f24172c2d90a7038f263cad93cbdcddbbbca
Reviewed-on: https://go-review.googlesource.com/c/review/+/681176
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Junyang Shao &lt;shaojunyang@google.com&gt;
Reviewed-by: Sean Liao &lt;sean@liao.dev&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Auto-Submit: Sean Liao &lt;sean@liao.dev&gt;
</content>
</entry>
<entry>
<title>git-codereview: use --no-ff for sync-branch</title>
<updated>2024-04-03T20:29:03Z</updated>
<author>
<name>Cherry Mui</name>
<email>cherryyz@google.com</email>
</author>
<published>2021-05-11T21:07:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-review/commit/?id=c91ae924997076a8e6e6f16d1d9fb75f812e0cdd'/>
<id>urn:sha1:c91ae924997076a8e6e6f16d1d9fb75f812e0cdd</id>
<content type='text'>
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 &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
</content>
</entry>
<entry>
<title>git-codereview: remove usage of io/ioutil</title>
<updated>2024-01-25T17:04:12Z</updated>
<author>
<name>Joshua Sing</name>
<email>joshua@hypera.dev</email>
</author>
<published>2023-11-19T03:29:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-review/commit/?id=0e3f2836ef3e230ced34f5550aa937610e076531'/>
<id>urn:sha1:0e3f2836ef3e230ced34f5550aa937610e076531</id>
<content type='text'>
io/ioutil is now deprecated. Use non-deprecated equivalents.

Change-Id: Iad1cc9c14dbdad3a6f9ada25072bc194bace4081
Reviewed-on: https://go-review.googlesource.com/c/review/+/543615
Reviewed-by: qiulaidongfeng &lt;2645477756@qq.com&gt;
Auto-Submit: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
</content>
</entry>
<entry>
<title>git-codereview: fix sync-branch to work in worktrees</title>
<updated>2022-04-06T16:00:51Z</updated>
<author>
<name>Filippo Valsorda</name>
<email>filippo@golang.org</email>
</author>
<published>2021-02-07T23:10:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-review/commit/?id=8c1fa9c3b8ad0c79f9cefba3bdd8afde5d569f38'/>
<id>urn:sha1:8c1fa9c3b8ad0c79f9cefba3bdd8afde5d569f38</id>
<content type='text'>
Change-Id: I8a3bcad53eae3273dc498ba94d53fe2d50b58520
Reviewed-on: https://go-review.googlesource.com/c/review/+/290212
Trust: Filippo Valsorda &lt;filippo@golang.org&gt;
Run-TryBot: Filippo Valsorda &lt;filippo@golang.org&gt;
Auto-Submit: Filippo Valsorda &lt;filippo@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
</entry>
<entry>
<title>git-codereview: disable message about skipped cherry-picks in sync</title>
<updated>2022-01-27T19:37:11Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-09-21T14:05:04Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-review/commit/?id=6c9968886cef395fe719e2a9bd89d9cb85aa66fb'/>
<id>urn:sha1:6c9968886cef395fe719e2a9bd89d9cb85aa66fb</id>
<content type='text'>
Sync very frequently is done to zero out submitted CLs.
New git versions print

	hint: use --reapply-cherry-picks to include skipped commits
	hint: Disable this message with "git config advice.skippedCherryPicks false"

This message is noise more often than signal, so disable it during sync.

Change-Id: Ida8867cbd614027f43bbbe6e6389a8920aae5293
Reviewed-on: https://go-review.googlesource.com/c/review/+/351209
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>git-codereview: set GIT_GOFMT_HOOK=off for sync-branch</title>
<updated>2021-05-18T20:24:57Z</updated>
<author>
<name>Katie Hockman</name>
<email>katie@golang.org</email>
</author>
<published>2021-05-14T21:12:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-review/commit/?id=59af8024e2991b2377085f37062acf68ece50ced'/>
<id>urn:sha1:59af8024e2991b2377085f37062acf68ece50ced</id>
<content type='text'>
When doing a merge, it's unlikely that someone
would want to run gofmt for files they didn't
edit, so turn that off by default.

Change-Id: I6c95b866740d5deda575feda256eee35dba3d9d1
Reviewed-on: https://go-review.googlesource.com/c/review/+/320269
Trust: Katie Hockman &lt;katie@golang.org&gt;
Run-TryBot: Katie Hockman &lt;katie@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
</entry>
<entry>
<title>git-codereview: add sync-branch -merge-back-to-parent</title>
<updated>2021-01-13T14:40:17Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-01-08T02:14:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-review/commit/?id=b8a6970a0e71c91d2cbed7d3a77142e2202f87a0'/>
<id>urn:sha1:b8a6970a0e71c91d2cbed7d3a77142e2202f87a0</id>
<content type='text'>
Dev branches come to an end.
Making sync-branch help that process instead of forcing
people to follow a playbook will help avoid mistakes.
The flag name was chosen to be very unlikely to be used
accidentally, and the commit subject and message both
are distinct to make clear to reviewers what they are being
asked to +2.

The Merge List is also included in full and is likely to be
quite large, yet another signal for everyone involved about
the magnitude and weight of the change.

Change-Id: I91cdda2b85cd3811711a339f4f3290fee109022e
Reviewed-on: https://go-review.googlesource.com/c/review/+/282534
Trust: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</content>
</entry>
<entry>
<title>git-codereview: clean up detached HEAD mode</title>
<updated>2021-01-13T14:40:11Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-01-08T16:05:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-review/commit/?id=b916a6f42a60763185b530b8bd15d6aa0099e5da'/>
<id>urn:sha1:b916a6f42a60763185b530b8bd15d6aa0099e5da</id>
<content type='text'>
Long ago I decided to return origin/HEAD from b.OriginBranch
in detached HEAD mode, thinking it would cause obvious failures.
But the joke was on me - origin/HEAD is a real thing in git,
and HEAD tracking origin/HEAD is not the right answer on dev branches.

Now that each branch's codereview.cfg typically has the branch info
we need, we can use that in detached HEAD mode to be able to provide
useful displays in commands like "git pending". And we can be careful
not to do that when we don't know the actual branch.

This commit cleans all that up.

Change-Id: I0e59bcb6f9b61e0cdce7a27299b7f29fef8e7048
Reviewed-on: https://go-review.googlesource.com/c/review/+/282616
Trust: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</content>
</entry>
</feed>
