git: git_create_branch cannot create a branch from a detached HEAD
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
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- git, typescript
- Ambito
- devtools
Direzione di ricerca
Start in src/git/src/mcp_server_git/server.py at git_create_branch and trace how it handles a detached HEAD and resolves base_branch; the issue cites #4955 as a prototype. Reproduce on a detached commit, then verify the branch is created from that commit and the reply names its SHA, or that a commit-ish is accepted while a leading - is rejected.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
git_create_branch in src/git/src/mcp_server_git/server.py refuses to branch from a detached HEAD when no base_branch is given, and tells the caller to pass base_branch. But base_branch is looked up among the repository's references, so passing a commit SHA fails too. A branch therefore cannot be created at a detached commit unless a ref already points there, which blocks the ordinary git switch -c <name> way of keeping work done on a detached HEAD. Reproduced on v2/main.
Expected
On a detached HEAD with no base_branch, branch from the current commit and name the SHA in the reply, or accept a commit-ish for base_branch (still rejecting a leading -).
Prior work
- #4955 by @kabishou11
The PR(s) above targeted the pre-refactor code and are closed as part of the backlog triage in #4875; this issue is where the work continues, with the PR(s) as a prototype. Thank you to their authors.
- Lingua principale
- TypeScript
- Stelle
- 91.6k
- Fork
- 11.9k
- Merge medio
- 6h 37m
- PR unite (30g)
- 147
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelcontextprotocol/servers
-
chore v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
modelcontextprotocol/servers#5261 ·
I maintainer di solito rispondono entro 1 giorno
-
docs(git): clarify unconfined default scope and repository confinement options in README and CLIAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
modelcontextprotocol/servers#5231 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
docs(git): clarify unconfined default scope and repository confinement options in README and CLIAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
modelcontextprotocol/servers#5230 ·
I maintainer di solito rispondono entro 1 giorno
-
git: README should state plainly that without --repository every reachable repository is in scopeApertadocumentation server-git v2
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
modelcontextprotocol/servers#5225 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
chore v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
modelcontextprotocol/servers#5223 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di modelcontextprotocol/servers
Issue simili
-
DRY stats column groupingsApertaready
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
wheresrhys/totf#1214 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CodeChefVIT/ffcs#281 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
endora-commerce/endora-commerce#451 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
vetro-protocol/vetro-monorepo#1007 ·
I maintainer di solito rispondono entro 1 giorno