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

Extra pile checks for format-patch #62

Open
lucasdemarchi opened this issue Jan 5, 2022 · 0 comments
Open

Extra pile checks for format-patch #62

lucasdemarchi opened this issue Jan 5, 2022 · 0 comments

Comments

@lucasdemarchi
Copy link
Contributor

One common mistake is to start preparing a patch series and before finishing it do a git fetch. When this is done the RESULT_BRANCH in the remote may not match the one the feature/fix started from. When we do a git pile format-patch it implicitly uses the remote branch to compare with git range-diff. That range-diff will not make sense if it contains changes outside what we really changed.

One idea to cope with that is: assuming pile_branch and result_branch from the remote are always in sync (i.e. nobody is pushing result_branch but rather generating from it), check if the merge-base of pile and origin/pile is origin/pile. If it is something else, it means the branches diverged and we should instruct the user to use the longer form of format-patch, passing a sensible result_branch for comparison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant