branch_sync_guard: handle stack branches whose upstream is the parent branch

Aperta
#7,874 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
git, shell
Ambito
devtools

Direzione di ricerca

Start in scripts/lib/branch_sync_guard.sh, where the guard resolves the upstream via @{u}, and check how scripts/wait_pr_ready.sh calls it. Reproduce by creating a branch with git switch -c <branch> origin/<base> and inspecting git rev-parse --abbrev-ref @{u}. Done means the guard compares against origin/<current> when the upstream names a different branch, and prints a --no-track hint when that ref is missing. The issue does not name a test file.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

git switch -c <branch> origin/<base> sets the new branch's upstream to the parent PR's branch. scripts/lib/branch_sync_guard.sh then compares against that upstream, so wait_pr_ready.sh refuses the stack branch. An owner in the Cursor plugin stack had to run git branch --unset-upstream.

Proposed mechanism: when @{u} names a different branch than the current one and origin/<current> exists, compare against origin/<current>. Otherwise print a hint to use --no-track.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Lingua principale
TypeScript
Stelle
2.1k
Fork
139
Merge medio
4h 38m
PR unite (30g)
926

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/xum

Tutte le issue di coder/xum

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.