abhinav / abhinav/git-spice

branch submit matching: account for local changes

Offen
#496 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area/git enhancement
Vorherrschende Sprache
Go
Sterne
762
Forks
72
Ø Merge
18 Std. 24 Min.
Gemergte PRs (30 T.)
28

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.