scripts/setup-hooks.sh: fails in a git worktree because .git is a file
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
Línea de trabajo
Read scripts/setup-hooks.sh lines 8–13 and check how it locates the repository and hooks directory. Reproduce the failure in a linked worktree with git worktree add, then verify the script accepts the worktree and targets Git’s hooks directory. Done means setup succeeds in both a regular checkout and a linked worktree; pull request #142 is already open for this issue.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
HOOKS_DIR="${REPO_ROOT}/.git/hooks"
if [[ ! -d "${REPO_ROOT}/.git" ]]; then
echo "Error: not a git repository. Run from the repo root." >&2
exit 1
fi
Problem: In a linked worktree (git worktree add), .git is a file, not a directory. The script then prints "not a git repository" and exits 1. Also, git does not read hooks from <worktree>/.git/hooks.
Fix:
git -C "$REPO_ROOT" rev-parse --git-dir >/dev/null 2>&1 || { echo "Error: not a git repository." >&2; exit 1; }
HOOKS_DIR="$(git -C "$REPO_ROOT" rev-parse --path-format=absolute --git-path hooks)"
Found by a code read at commit 1e50295. The code was read, but not run on a real instance.
- Lenguaje dominante
- Shell
- Estrellas
- 73
- Forks
- 11
- Merge medio
- 6 h 46 min
- PR fusionados (30 d)
- 5
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 inceptionstack/lowkey
-
bug good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
inceptionstack/lowkey#135 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
inceptionstack/lowkey#134 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 94/100
inceptionstack/lowkey#133 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
inceptionstack/lowkey#131 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
inceptionstack/lowkey#130 ·
Los mantenedores suelen responder en 1 día
Todos los issues de inceptionstack/lowkey
Issues similares
-
Webcam overlay freezes during voxtype dictation while screen recording (pause_media pauses the overlay mpv)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
TYPO3BestPractices/tea#2409 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
fw876/helloworld#2067 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
mattpocock/skills#1281 ·
Los mantenedores suelen responder en 1 día
-
pip_install() in notebook_utils.py drops version constraints on Windows because of shell=TruePosiblemente ocupada @prajakta128 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
openvinotoolkit/openvino_notebooks#3748 ·
Los mantenedores suelen responder en 1 día