abhinav / abhinav/git-spice

branch submit matching: account for local changes

Aperta
#496 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area/git enhancement
Lingua principale
Go
Stelle
762
Fork
72
Merge medio
18h 24m
PR unite (30g)
28

Descrizione

ref: https://github.com/abhinav/git-spice/issues/491#issuecomment-2500793201

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.