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: use rebase branch during rebase #21164

Open
aclements opened this issue Jul 25, 2017 · 1 comment
Open

x/review/git-codereview: use rebase branch during rebase #21164

aclements opened this issue Jul 25, 2017 · 1 comment
Labels
Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@aclements
Copy link
Member

Currently git-codereview doesn't add the appropriate "[branch]" prefix to commit messages created or amended during a rebase because all it sees is the detached HEAD state. As a fall back, it could look for .git/rebase-merge/head-name, which contains the full ref name of the branch being rebased and find that branch's upstream.

For example, this happened in https://golang.org/cl/50875.

/cc @josharian

@gopherbot gopherbot added this to the Unreleased milestone Jul 25, 2017
@josharian josharian added the Suggested Issues that may be good for new contributors looking for work to do. label Jul 25, 2017
@gopherbot
Copy link

Change https://golang.org/cl/375174 mentions this issue: git-codereview: hook: fixCommitMessage: improve upstream branch detection

r5d added a commit to r5d/review that referenced this issue Jan 3, 2022
…tion

`Branch.OriginBranch()` does not return the upstream branch name when
a commit is made during a rebase. Add handling to get the upstream
branch name of the rebase branch when `Branch.OriginBranch()` fails to
return a branch name.

Fixes golang/go#21164

Change-Id: I59ea724d9660dce72b22bf6f3b7ee2606cf6f8ae
r5d added a commit to r5d/review that referenced this issue Jan 3, 2022
`Branch.OriginBranch()` does not return the upstream branch name when
a commit is made during a rebase. Add handling to get the upstream
branch name of the rebase branch when `Branch.OriginBranch()` fails to
return a branch name.

Fixes golang/go#21164

Change-Id: I59ea724d9660dce72b22bf6f3b7ee2606cf6f8ae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

3 participants