git: git_create_branch cannot create a branch from a detached HEAD
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- git, typescript
- Área
- devtools
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 91.6k
- Forks
- 11.9k
- Merge medio
- 5 h 18 min
- PR fusionados (30 d)
- 185
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/servers
-
filesystem: bounded-walk 100000-entry test times out on slow Windows runners (vitest's 5 s default)Abiertobug server-filesystem v2
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
modelcontextprotocol/servers#5328 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug server-filesystem v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
modelcontextprotocol/servers#5314 ·
Los mantenedores suelen responder en 1 día
-
docs(git): clarify unconfined default scope and repository confinement options in README and CLIAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
modelcontextprotocol/servers#5231 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
docs(git): clarify unconfined default scope and repository confinement options in README and CLIAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
modelcontextprotocol/servers#5230 ·
Los mantenedores suelen responder en 1 día
-
bug v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
modelcontextprotocol/servers#5217 ·
Los mantenedores suelen responder en 1 día
Todos los issues de modelcontextprotocol/servers
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 80/100
nuxt-content/nuxt-studio#599 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
hurttlocker/o8#4997 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
danielmiessler/LifeOS#2413 ·
Los mantenedores suelen responder en 3 días
-
Plugin: sheet music can't be scrolled by hand before playbackPosiblemente ocupada @snakajima la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
receptron/jinglescript#51 ·
Los mantenedores suelen responder en 1 día