From: Amélia Coutard-Sander <git@ameliathe1st.gay>
Date: Mon, 2 Dec 2024 21:34:44 +0000 (+0100)
Subject: Fix git repo check (didn't work for bare repos)
X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=dc96aacd19a50d43241d457085cea365f69d61f4;p=git-over-gnunet.git

Fix git repo check (didn't work for bare repos)
---

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"