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

branch submit matching: account for local changes #496

Open
abhinav opened this issue Nov 26, 2024 · 0 comments
Open

branch submit matching: account for local changes #496

abhinav opened this issue Nov 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@abhinav
Copy link
Owner

abhinav commented Nov 26, 2024

ref: #491 (comment)

When submitting a branch that doesn't have a PR associated with it,
git-spice attempts to detect previously submitted PRs for the same branch
(either by git-spice or manually).
This matching logic expects the PR's HEAD to be the same as the local branch.
If the PR's HEAD is different, git-spice will assume it's a conflicting branch
name and will generate a new upstream branch name.

This breaks a workflow where you:

  • check out a PR submitted elsewhere with git-spice
  • make a few changes
  • try to use git-spice to submit the PR

The PR's head doesn't match the local HEAD because of the local changes.

A possible improvement here is to check the local HEAD's parents. Perhaps:
if PR's HEAD is reachable from the local HEAD,
and there are no other branches in the middle,
then consider it a match.

@abhinav abhinav added the enhancement New feature or request label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant