| Age | Commit message (Collapse) | Author |
|
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
|
|
Change-Id: I0650c81a855138049e9132d56cc742620ecaf185
Reviewed-on: https://go-review.googlesource.com/c/review/+/713362
Reviewed-by: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: I17ad065e8b4c1eb00cdd2f17af82be76bae4fc09
Reviewed-on: https://go-review.googlesource.com/c/review/+/279717
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
|
|
Change-Id: I634a9d47401c1000bcb38e9dd7e84296a3de00e6
Reviewed-on: https://go-review.googlesource.com/c/review/+/254746
Trust: Russ Cox <rsc@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
|
|
The expectation is that approvers will change their .gitconfig
to define mail as codereview mail -trust.
For golang/go#40699.
Change-Id: I2a1040bf3f1c7248e9c361e1f2a83c17870b1df5
Reviewed-on: https://go-review.googlesource.com/c/review/+/254421
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
|
|
Mergeable has been removed from the Gerrit API -
it was too expensive to maintain, had racy semantics,
and was too little used.
As of right now, git submit fails because it doesn't see
"mergeable":true in the JSON.
Remove the use of it in git-codereview.
Change-Id: I12c821b9dbc44183a689d510dd20104eab5a0043
Reviewed-on: https://go-review.googlesource.com/c/review/+/222937
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
|
|
Also create a local DΟ NΟT SUBMIT check,
although the Gerrit server is also taking care of that.
While we're here, make fixup! and squash! commits
non-mailable as well.
(In the all caps text above the big Os are really Omicrons.
Otherwise the CL would not be mailable or submittable.)
Change-Id: Id1a9806b0d395d1a0bfc50ed7d7d22c64a48a2f1
Reviewed-on: https://go-review.googlesource.com/76877
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
|
|
When using 'git change' to amend the current change, it will fail
if there are multiple pending changes. The previous behavior (amending
the latest) wasn't always what the user intended.
$ git change
git-codereview: cannot amend change: multiple changes pending:
fc60fd5 test: dummy change
6440cdc git-codereview: make change fail with multiple pending changes
$
Unlike mail and submit, change doesn't support explicitly telling
which commit to work on. Either 'git commit --amend' (for updating
the topmost change) or a combination of 'git commit' and 'git rebase'
must be used.
Fixes golang/go#10443.
Change-Id: I2f6ea1b0e302b66b627761d72d031a3b6aa0fba2
Reviewed-on: https://go-review.googlesource.com/20049
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Andrew Gerrand <adg@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
|
|
Currently the mail and submit subcommands only accept commit hashes.
This makes them inconsistent with other git commands (git is hard
enough without having to remember another convention) and makes
working with multi-commit branches cumbersome.
Change mail and submit to accept any standard commit spelling. In
particular, this makes it possible to use HEAD-relative names: "git
mail HEAD" sends the whole current branch. We still require that the
named commit be pending on the current branch to avoid accidentally
naming a completely unrelated commit.
Change-Id: If84d315e0fc32118a5283adfbca7a3b56f3c098c
Reviewed-on: https://go-review.googlesource.com/19271
Reviewed-by: Russ Cox <rsc@golang.org>
|
|
This adds a -i option to submit that brings up a list of commits to
submit in an editor (a la git rebase -i), lets the user edit the list,
and then submits the specified commits in the specified order.
Change-Id: I88149140527c987ae856aac2598f0a992fe5654d
Reviewed-on: https://go-review.googlesource.com/16677
Reviewed-by: Andrew Gerrand <adg@golang.org>
|
|
Change-Id: I92dad5653de950a6e920c8cb880dd34f98af9426
Reviewed-on: https://go-review.googlesource.com/16676
Reviewed-by: Andrew Gerrand <adg@golang.org>
|
|
This adds support to the submit subcommand for passing and submitting
multiple commit hashes.
Change-Id: Id030b07cac21d11acbeb8015fde9cb9e1acb1479
Reviewed-on: https://go-review.googlesource.com/16674
Reviewed-by: Andrew Gerrand <adg@golang.org>
|
|
This factors the logic for committing a single change in preparation
for supporting submitting multiple changes at once.
Change-Id: Ida083ada2c3a5393f99159e588dbc87af3902091
Reviewed-on: https://go-review.googlesource.com/16673
Reviewed-by: Andrew Gerrand <adg@golang.org>
|
|
The name space is getting a bit crowded.
These words are too easy to use for other variables or functions.
Change-Id: Iedbccb82f85627fe422a029a6b45ad39a2e18dd0
Reviewed-on: https://go-review.googlesource.com/3627
Reviewed-by: Rob Pike <r@golang.org>
|
|
Gerrit supports multiple-change branches, and we'd like to make
git-codereview useful for people using this mode of work.
This CL is the first step.
- remove error message on detecting a multiple-change branch
- require 'git submit hash' in multiple-change branch
- make git submit, git sync cleanup safe for multiple-change branch
- adjust git pending output to show full information about multiple-change branch
- add pending -c to show only current branch, since output is getting long
We're not advertising or supporting this mode yet. For now the only
way to enter it is to run 'git commit' to create the second commit.
Perhaps eventually we will support something like 'git change -new'.
Change-Id: I8284a7c230503061d3e6d7cce0be7d8d05c9b2a3
Reviewed-on: https://go-review.googlesource.com/2110
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
|
|
Change-Id: Id0c73d56cc0cba8fbe5e67fb31ec5f96cbfb9d61
Reviewed-on: https://go-review.googlesource.com/2010
Reviewed-by: Russ Cox <rsc@golang.org>
|
|
Mostly trivial search and replace, except for hooks.go which
includes a special case to remove the old git-review hooks.
Change-Id: Ic0792bb3e26607e5e0ead88958e46c3ac08288cd
Reviewed-on: https://go-review.googlesource.com/1741
Reviewed-by: Russ Cox <rsc@golang.org>
|