From dc96aacd19a50d43241d457085cea365f69d61f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Am=C3=A9lia=20Coutard-Sander?= Date: Mon, 2 Dec 2024 22:34:44 +0100 Subject: [PATCH] Fix git repo check (didn't work for bare repos) --- handle-request.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handle-request.sh b/handle-request.sh index 32785ed..97d8f4c 100755 --- a/handle-request.sh +++ b/handle-request.sh @@ -23,7 +23,7 @@ if test "$comm" != "git-upload-pack"; then exit 1 fi -git -C "$base_path$path" status >/dev/null 2>/dev/null || { echo "Not a git repository." | tee /dev/stderr; exit 1; } +git -C "$base_path$path" rev-parse --git-dir >/dev/null 2>/dev/null || { echo "Not a git repository." | tee /dev/stderr; exit 1; } echo '' exec "$comm" "$base_path$path" -- 2.46.0