aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-08-13all: upgrade go directive to at least 1.24.0 [generated]v1.17.0Gopher Robot
By now Go 1.25.0 has been released, and Go 1.23 is no longer supported per the Go Release Policy (see https://go.dev/doc/devel/release#policy). For golang/go#69095. [git-generate] (cd . && go get go@1.24.0 && go mod tidy && go fix ./... && go mod edit -toolchain=none) Change-Id: I2027bac1da172f9a103b6608707d65de65cc1f3c Reviewed-on: https://go-review.googlesource.com/c/review/+/695735 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2025-07-09git-codereview: frame sync as git codereview syncv1.16.0Matt T. Proud
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>
2025-06-17git-codereview: explicitly include the codereview subcommand in suggested ↵Adam Bender
commands 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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Sean Liao <sean@liao.dev>
2025-04-11git-codereview: do not write hooks if -n is givenv1.15.0Anatoli Babenia
Fixes golang/go#73314 Change-Id: I881c2ae97f72990a6daac4919687f85cb24ac076 Reviewed-on: https://go-review.googlesource.com/c/review/+/664555 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org>
2025-02-14all: upgrade go directive to at least 1.23.0 [generated]v1.14.0Gopher Robot
By now Go 1.24.0 has been released, and Go 1.22 is no longer supported per the Go Release Policy (https://go.dev/doc/devel/release#policy). For golang/go#69095. [git-generate] (cd . && go get go@1.23.0 && go mod tidy && go fix ./... && go mod edit -toolchain=none) Change-Id: I8369e7520e7c4881978b7dabc9e03f8cd86a3939 Reviewed-on: https://go-review.googlesource.com/c/review/+/649397 Auto-Submit: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2025-02-06git-codereview: pending: add -g optionIan Lance Taylor
This is a convenient format for listing changes awaiting review, for pasting into an e-mail or chat. Change-Id: Ib31bf0307d34aaca3e4de4baf9be4c3b3ac60be7 Reviewed-on: https://go-review.googlesource.com/c/review/+/647096 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-11-02README: don't mention GOPATHv1.13.0Ian Lance Taylor
Add a pointer to the git repo. For golang/go#62645 Change-Id: Ie28be88c7ed4ff3f0f758a7cf8f1c5bf64e5a1f3 Reviewed-on: https://go-review.googlesource.com/c/review/+/624215 Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-07-16LICENSE: update per Google Legalv1.12.0Russ Cox
Very minor tweaks: - Remove (c) pseudosymbol. - Remove "All Rights Reserved." - Change "Google Inc." (no longer exists) to "Google LLC". [git-generate] echo ' ,s/\(c\) // ,s/ All rights reserved.// ,s/Google Inc./Google LLC/ w q ' | sam -d LICENSE Change-Id: I9ac1297e97f67367d42bbe91bc22d8feaa96fa2e Reviewed-on: https://go-review.googlesource.com/c/review/+/598526 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-04-03git-codereview: use --no-ff for sync-branchv1.11.0Cherry Mui
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>
2024-02-29git-codereview: improve haveGerritInternalv1.10.0Joshua Sing
Use url.Parse and check URL components rather than performing imprecise string matching. This addresses a bug where git-codereview does not work when the Git origin ends with a forward slash. Note that the check for 'github.com' has been removed since the test for '.googlesource.com' already excludes it. Change-Id: I083bccdbacf2152cbfddd2407fb20afa47c8e91e Reviewed-on: https://go-review.googlesource.com/c/review/+/543495 Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Joel Sing <joel@sing.id.au>
2024-01-25git-codereview: remove usage of io/ioutilv1.9.0Joshua Sing
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 <2645477756@qq.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2023-10-18git-codereview: make hooks command report conflicting hooksv1.8.0siddharth ravikumar
Display warning message when a hook is already installed and is different from the one installed by git-codereview. Improves upon CL 184417. Fixes golang/go#16777 Change-Id: I7579a3e86572e8b74f92317973e7cc7094b3942d Reviewed-on: https://go-review.googlesource.com/c/review/+/377034 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2023-10-11all: update go directive to 1.18Dmitri Shuralyov
Done with: go get go@1.18 go mod tidy go fix ./... Using go1.21.3. While here, use testing.T.Helper directly and delete go19_test.go. For golang/go#60268. Change-Id: I924bb6d107180a04d1f879003b169c7f792d8dd4 Reviewed-on: https://go-review.googlesource.com/c/review/+/534198 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2023-10-02git-codereview: use strings.Cutv1.7.0Dmitri Shuralyov
Basic cut functionality is available in the standard library as of Go 1.18, so today's supported Go versions (1.21 & 1.20) can use it. Also simplify some slice and map code while here. Change-Id: Ie887fc2dad542cd9a830974cf9c8373baa81ad8b Reviewed-on: https://go-review.googlesource.com/c/review/+/531955 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2023-08-28git-codereview: change default -trybot flag to use LUCIv1.6.0Dmitri Shuralyov
For when it's time. Change-Id: Ife6df8eed0a02d9a47ffca141be083aaf3b09d28 Reviewed-on: https://go-review.googlesource.com/c/review/+/523115 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-08-25git-codereview: add GIT_CODEREVIEW_TRYBOT env var to control CI systemDmitri Shuralyov
The mail command has a -trybot flag, useful to start TryBots on the CL being mailed. The new LUCI trybots are almost ready, and we'll soon be asking contributors to consider them the new default. Prepare for that by adding a temporary GIT_CODEREVIEW_TRYBOT environment variable which will make it possible to override the CI system invoked by the -trybot flag. This CL keeps the default as the old CI system (farmer.golang.org), and the next CL switches it to the new one (ci.chromium.org/p/golang). The environment variable will eventually be removed once it has no use. Change-Id: Ia20bb0cad1fee387b2d94a8438e8a3be3ec87e6b Reviewed-on: https://go-review.googlesource.com/c/review/+/523095 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-08-16git-codereview: fix commentcui fliter
Change-Id: I265d394872a05441ccbf73388e9ff1b625435343 Reviewed-on: https://go-review.googlesource.com/c/review/+/518638 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
2023-07-27git-codereview: allow _content to not warnv1.5.0Sean Liao
Fixes golang/go#45734 Change-Id: I20ebc9fb728c5e91a3d71d3a6290ccf27ceb14cf Reviewed-on: https://go-review.googlesource.com/c/review/+/496775 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2023-06-26git-codereview: fix TestReword on Windowsv1.4.0Dmitri Shuralyov
It wasn't caught by x/build's Windows builders because they don't have git and skip these tests. But LUCI ones do have git, and caught this. For golang/go#46693. Change-Id: I50f3b69909344f4657e5c737e3b434a2538e4939 Reviewed-on: https://go-review.googlesource.com/c/review/+/505895 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
2023-06-22git-codereview: fix mail lookup for dmitshur short nameDmitri Shuralyov
CL 2111 introduced a simple algorithm for expanding short user names that works locally and generally doesn't need any extra configuration to do the right thing. It's been serving for almost a decade. Unfortunately I'm running into an edge where I see no good option but to add a special case. Gerrit inserts "Reviewed-by" footers both for Code-Review +2 and +1 votes without any way to distinguish between them, and my @google.com account unavoidably gets more hits since I use it for the go.dev/s/needs-review process, whenever I leave a normal +2, and on my own CLs. The simplest fix seems to be to exclude it from short matches and let the existing algorithm do the rest. Change-Id: I92da69f1cd87b4c89816547015cffbed3eaaeaf6 Reviewed-on: https://go-review.googlesource.com/c/review/+/494175 Reviewed-by: MKaslann1 <mkaslann1@outlook.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2023-06-02git-codereview: recognize sso://go/ and rpc://go/v1.3.0Russ Cox
Google engineers are now required to use these access methods instead of https://go.googlesource.com/, so recognize them as aliases. (It is possible for every engineer to configure their Git clients with insteadOf clauses to hide these from the codereview plugin, but it's far less error-prone to just handle it here.) Change-Id: Ic1c9a6b45aa61b11ff25ce21bca6e49344974b04 Reviewed-on: https://go-review.googlesource.com/c/review/+/499923 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Peter Weinberger <pjw@google.com> Run-TryBot: Russ Cox <rsc@golang.org>
2022-11-01git-codereview: allow trailing slash in git originv1.2.0Benny Siegert
An origin like "https://go.googlesource.com/build/" should also work. Perhaps this should use net/url instead of parsing URLs by hand. Change-Id: I5304324ae67c054b8377d500ecafe46b296d1531 Reviewed-on: https://go-review.googlesource.com/c/review/+/442875 Reviewed-by: Heschi Kreinick <heschi@google.com> Run-TryBot: Benny Siegert <bsiegert@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-10-03git-codereview: add -autosubmitv1.1.0Heschi Kreinick
Add a flag to set the Auto-Submit label. For golang/go#48021. Change-Id: If704e8b5e9e0e2521eed78fe28af10d3c31ec3a0 Reviewed-on: https://go-review.googlesource.com/c/review/+/431375 Auto-Submit: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Heschi Kreinick <heschi@google.com>
2022-07-22A+C: delete AUTHORS and CONTRIBUTORSRuss Cox
In 2009, Google's open-source lawyers asked us to create the AUTHORS file to define "The Go Authors", and the CONTRIBUTORS file was in keeping with open source best practices of the time. Re-reviewing our repos now in 2022, the open-source lawyers are comfortable with source control history taking the place of the AUTHORS file, and most open source projects no longer maintain CONTRIBUTORS files. To ease maintenance, remove AUTHORS and CONTRIBUTORS from all repos. For golang/go#53961. Change-Id: Idf51261da9667c3f04b13976ed0686f06cbf42c0 Reviewed-on: https://go-review.googlesource.com/c/review/+/419101 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-01git-codereview: print more about Gerrit API errorsRuss Cox
For golang/go#50576. Change-Id: I3b67234098cbf9cd28bfa578c0b29744a4add2a3 Reviewed-on: https://go-review.googlesource.com/c/review/+/409914 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2022-04-14git-codereview: print about all Gerrit API errorsRuss Cox
Trying to chase down a problem with slow builders. If this gets to be too chatty, we can limit it to builders. For golang/go#50576. Change-Id: I16c7818153d2444c897b4946ce7baebbd646ab23 Reviewed-on: https://go-review.googlesource.com/c/review/+/399116 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
2022-04-12git-codereview: remove -trustRuss Cox
We don't use that label anymore. Change-Id: Ic31841efaea5d9d9ae38077d8c3a3b6c548fee88 Reviewed-on: https://go-review.googlesource.com/c/review/+/399117 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-12git-codereview: fix how to install the commandcia-rana
Change-Id: Iaa78b677af114d3e6ec48855aa8d5459e4f979ef Reviewed-on: https://go-review.googlesource.com/c/review/+/399314 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Kevin Burke <kevin@burke.dev> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2022-04-11all: gofmtRuss Cox
Gofmt to update doc comments to the new formatting. For golang/go#51082. Change-Id: I257fdc6811a1156714d7c7934f6256f07a460b9d Reviewed-on: https://go-review.googlesource.com/c/review/+/399618 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-04-06git-codereview: handle branches checked out in a worktreeFilippo Valsorda
Change-Id: I085f1d27e9d109a81bc40603b98ebf0d827dfd66 Reviewed-on: https://go-review.googlesource.com/c/review/+/359814 Trust: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2022-04-06git-codereview: fix sync-branch to work in worktreesFilippo Valsorda
Change-Id: I8a3bcad53eae3273dc498ba94d53fe2d50b58520 Reviewed-on: https://go-review.googlesource.com/c/review/+/290212 Trust: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2022-04-05all: update go.mod versionFilippo Valsorda
Signed shifts in gofmt.go and submit.go require Go 1.13 or later. Change-Id: I32c84ddfd052717d06f1bbe1543a5d4558b60807 Reviewed-on: https://go-review.googlesource.com/c/review/+/398374 Trust: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-03-31git-codereview: add mail --no-verify optionDamien Neil
This adds a flag to set git push --no-verify, disabling pre-push hooks. Change-Id: I9ef686bd3ec742901d0138fc9028d65efde83e87 Reviewed-on: https://go-review.googlesource.com/c/review/+/222922 Trust: Damien Neil <dneil@google.com> Run-TryBot: Damien Neil <dneil@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Trust: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-01-27git-codereview: disable message about skipped cherry-picks in syncv1.0.3Russ Cox
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 <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-01-07review: fix TestSyncRebase testsiddharth
Disable `advice.skippedCherryPicks` on the test client git repo to suppress git's --reapply-cherry-picks hint when commits with same content but different commit hashes are skipped on rebase. Fixes golang/go#50453 Change-Id: I6d3a9cebf50f55c96d2ad096a58222c7988bcc61 Reviewed-on: https://go-review.googlesource.com/c/review/+/376039 Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Trust: Heschi Kreinick <heschi@google.com> Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-12-03git-codereview: don't sign git tagsTobias Klauser
For users who set tag.gpgSign=true in their git configuration, git-codereview mail currently fails to create the .mailed git tag because a signed git tag always requires a message: fatal: no tag message? (running: git tag -f foobar.mailed cf87726ac456) /home/tklauser/go/bin/git-codereview: exit status 128 Fix this by overriding the tag.gpgSign configuration using git tag --no-sign. There is no point in having these tags signed as they should never leave the local system. Change-Id: I8b7ddf3aa7709e6ea06e4d5add6cd581e9ec2e37 Reviewed-on: https://go-review.googlesource.com/c/review/+/369194 Trust: Tobias Klauser <tobias.klauser@gmail.com> Trust: Bryan Mills <bcmills@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
2021-12-03git-codereview: log stderr and stdout from successful commandsBryan C. Mills
The reason for the failures in golang/go#49899 is not clear. Perhaps the stderr output will shed some light on what is happening. For golang/go#49899 Change-Id: I37c6339c8ebd4a37e4ff5b3b813572193903cee4 Reviewed-on: https://go-review.googlesource.com/c/review/+/368174 Trust: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-09-21git-codereview: reword: apply commit message hook to editsRuss Cox
If you run "git codereview reword" you should get the same "Fixes" fixing and Change-Id insertion as with regular commit message editing. Change-Id: I77220d42b49f575c07a7c1ef786c3775ee75133c Reviewed-on: https://go-review.googlesource.com/c/review/+/295310 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-07-29git-codereview: add -s option for changePaul Jolly
Some projects (CUE, https://cuelang.org, is one such example) use the Developer Certificate of Origin (https://developercertificate.org) as an alternative to a CLA. For such projects, all commit messages must contain the Signed-off-by trailer, with an email address that matches the commit author. This requires the -s flag to be passed to git commit. This change adds a -s flag to git-codereview's change command, which is then simply passed through to git commit. Change-Id: I6aeac37a1bcdc6e260ae822d3a03117fb87f846f Reviewed-on: https://go-review.googlesource.com/c/review/+/334750 Trust: Paul Jolly <paul@myitcv.org.uk> Run-TryBot: Paul Jolly <paul@myitcv.org.uk> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2021-05-18git-codereview: set GIT_GOFMT_HOOK=off for sync-branchKatie Hockman
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 <katie@golang.org> Run-TryBot: Katie Hockman <katie@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2021-02-23git-codereview: pending: show unresolved comment countRuss Cox
Also fix a potential crash parsing a commit with no parents. Change-Id: I1c289dde45230a3362f54037ea18023278b05ffd Reviewed-on: https://go-review.googlesource.com/c/review/+/294129 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-02-18git-codereview: fix active rebase detectionv1.0.2Russ Cox
A sync + merge conflict + git rebase --continue can leave behind a REBASE_HEAD even though it really should not. So don't use that as the signal that there's an active rebase. The rebase-merge directory is a better signal and seems to be cleaned up more diligently than REBASE_HEAD. Change-Id: Ie5bc20156e19fc7ce3e32333babea784242dc770 Reviewed-on: https://go-review.googlesource.com/c/review/+/293838 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Katie Hockman <katie@golang.org>
2021-02-17git-codereview: document sync-branchRuss Cox
Change-Id: If5f9018bc1a87444df44c4d8ae853908ee283154 Reviewed-on: https://go-review.googlesource.com/c/review/+/283613 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org>
2021-02-12git-codereview: fix runDirErr to actually use the passed directoryFilippo Valsorda
Change-Id: I39f16f70e928999674b4f6f60c505ca0a51c46a9 Reviewed-on: https://go-review.googlesource.com/c/review/+/290211 Trust: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2021-01-27git-codereview: avoid race in loadGerritOriginIan Lance Taylor
Use a mutex in loadGerritOrigin to avoid race when called in parallel by "git coderevew pending". Add a new initialized field so that the code knows when auth has been initialized. Adjust tests accordingly. The test is simply "go test -race". Fixes golang/go#43670 Change-Id: Ifb060fca6ed463f1d11a2959d03fca5e14e238c6 Reviewed-on: https://go-review.googlesource.com/c/review/+/287012 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-01-15git-codereview: fix buglet in 'reword' related to work treesThan McIntosh
The reword command was trying to store a saved messages file in the subdirectory .git in the repo root; this doesn't work well if multiple work trees are in use and the user is working in a non-main work tree. Use "git rev-parse --git-path ." instead of "git rev-parse --show-top-level" to find the location for the saved messages file. Fixes golang/go#43695. Change-Id: Ie0b3e810ad585fe1c18805f4070736335a2ef2b5 Reviewed-on: https://go-review.googlesource.com/c/review/+/283646 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Trust: Than McIntosh <thanm@google.com>
2021-01-13git-codereview: add sync-branch -merge-back-to-parentRuss Cox
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 <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-01-13git-codereview: clean up detached HEAD modeRuss Cox
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 <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-01-13git-codereview: add reword commandRuss Cox
Quoting the new docs: The reword command edits pending commit messages. git codereview reword [commit...] Reword opens the editor on the commit message for each named commit in turn. When all the editing is finished, it applies the changes to the pending commits. If no commit is listed, reword applies to the most recent pending commit. Reword is similar in effect to running “git codereview rebase-work” and changing the script action for the named commits to “reword”, or (with no arguments) to “git commit --amend”, but it only affects the commit messages, not the state of the git staged index, nor any checked-out files. This more careful implementation makes it safe to use when there are local changes or, for example, when tests are running that would be broken by temporary changes to the checked-out tree, as would happen during “git codereview rebase-work”. Change-Id: I38ac939b8530bf237c6cafb911f2b17d22eaca60 Reviewed-on: https://go-review.googlesource.com/c/review/+/279718 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-01-13git-codereview: new sync-branch and related fixesRuss Cox
This CL adds a new command, "git codereview sync-branch", which does the appropriate git merge for the current branch. This CL also fixes a bug in "git codereview branchpoint", and therefore also commands like "git codereview pending", which was getting the branchpoint wrong for merges, with the effect that a merge showed too many pending CLs. This CL also fixes a bug in "git codereview change", which was formerly willing to run "git checkout" with a pending merge, which had the effect of flattening the merge mysteriously. Now it detects the merge and refuses to run. All of this should make merges easier and less error-prone as we use dev branches more often. With the earlier CL in this stack that allows working directly on local branches, this is now a great way to run a merge updating dev.regabi: git change dev.regabi git sync-branch (with appropriate aliases to avoid typing "codereview"). Fixes golang/go#26201. Change-Id: Ic24603123ca5135a72004309f5bb208ff149c9eb Reviewed-on: https://go-review.googlesource.com/c/review/+/279772 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>