| Issue 1815: | Use new refs/for/ syntax to specify base commit for pushing-for-review | |
| 3 people starred this issue and may be notified of changes. | Back to list |
There are cases where Gerrit rejects a push for review with a "No New Changes" error. This occurs when no commits are uploaded to the server during the push as part of the Git protocol. This has been discussed here: https://groups.google.com/d/topic/repo-discuss/tvLTL3aEKEE/discussion https://groups.google.com/d/topic/repo-discuss/havWiRfDa7M/discussion It has been discussed that this could be resolved in the new refs/@ syntax for passing options during a push: https://groups.google.com/d/topic/repo-discuss/r9XKwpA8ZSw/discussion sop@google.com says in an e-mail: "I think what you really need here is a base commit. Gerrit would then create a change for each commit in the range $base..$head. Currently it assumes $base as the set of all current known commits. So lets say I want to push a single new commit: git push URL HEAD:refs/for/master%base=$(git rev-parse HEAD^) would tell Gerrit to create a single change, as there is one commit in the range $(git rev-parse HEAD^)..HEAD. If I wanted the last 3: git push URL HEAD:refs/for/master%base=$(git rev-parse HEAD~3) We discussed that Gerrit maybe should have a default limit on how many changes it would make like this, maybe a cap of 5. So a user might have to also increase the limit: git push URL HEAD:refs/for/master%base=$(git rev-parse origin/stable),limit=100 would create up to 100 changes for every commit in HEAD that is not in the stable branch, as you last saw it during fetch. If we are kind to the user we could make base accept a revision expression to eval at the server: git push URL HEAD:refs/for/master%base=stable,limit=100 so now its using the stable branch as the server knows it, rather than as the client last observed it."
Nov 5, 2013
Project Member
#1
jrn@google.com
Nov 6, 2013
(No comment was entered for this change.)
Status:
Released
Labels: FixedIn-2.7 |
|
| ► Sign in to add a comment |