scripts/setup-hooks.sh: fails in a git worktree because .git is a file
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Shell
- スター
- 73
- フォーク
- 11
- 平均マージ
- 6時間 46分
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
inceptionstack/lowkey のほかの issue
-
bug good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
inceptionstack/lowkey#135 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
inceptionstack/lowkey#134 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
inceptionstack/lowkey#133 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
inceptionstack/lowkey#131 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
inceptionstack/lowkey#130 ·
メンテナーはふだん 1 日以内に返信
inceptionstack/lowkey の issue をすべて見る
似ている issue
-
docs: AGENTS.md has no rule against running deploy scripts into the owner's game install対応中かも @thesprockee が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
EchoTools/nevr-runtime#524 ·
メンテナーはふだん 1 日以内に返信
-
Install software-properties-common before adding the Suricata PPA対応中かも @himanishpuri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Ergane-Foundation/vajra#55 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
[cifuzz] "Minimizing crashes reduces fuzzing time" is logged for every batch run, even with minimize-crashes off対応中かも @martinfrancois が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
alunduil/alunduil-chezmoi#914 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
obra/superpowers#2505 ·
メンテナーはふだん 3 日以内に返信