abhinav / abhinav/git-spice

branch submit matching: account for local changes

Abierto
#496 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area/git enhancement
Lenguaje dominante
Go
Estrellas
762
Forks
72
Merge medio
18 h 24 min
PR fusionados (30 d)
28

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.