Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/review/git-codereview: change should complain if multiple CLs are outstanding #10443

Closed
robpike opened this issue Apr 13, 2015 · 4 comments
Closed

Comments

@robpike
Copy link
Contributor

robpike commented Apr 13, 2015

git mail complains if you have multiple CLs in the current branch: which CL do you mean? But git change just picks one and updates it, and it might not be the intended. Git change should have the same check as git mail.

@rsc rsc changed the title x/review: git-codereview change should complain if multiple CLs are outstanding x/review/git-codereview: change should complain if multiple CLs are outstanding Apr 14, 2015
@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Jun 3, 2015
@cmarcelo
Copy link
Contributor

One idea is to implement this using rebase --autosquash and --autostash options. But as with any rebase, we may hit conflicts, i.e. I have two CLs, and make an extra change, that I want to be applied in the first CL, but if this change depends (in terms of textual diffs) on the second CL.

When there's a conflict, rebase will stop and let the user fix the issue, then user calls git rebase --continue or git rebase --abort. It's not clear we want git change to leave the user in that state by default. Would we rather fail with something like: "couldn't apply change, use -f to fix conflicts"?

@adg
Copy link
Contributor

adg commented Feb 29, 2016

@cmarcelo I think the proposed change here is just that git change should complain if there are multiple outstanding commits. One may have arrived at this situation without realizing. I am resistant to reimplementing git-rebase in git-codereview.

@robpike
Copy link
Contributor Author

robpike commented Feb 29, 2016

@adg Yes, that's what I am asking for.

@gopherbot
Copy link

CL https://golang.org/cl/20049 mentions this issue.

@golang golang locked and limited conversation to collaborators May 28, 2017
@rsc rsc unassigned adg Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants