]> git.ameliathe1st.gay Git - git-over-gnunet.git/commitdiff
Fix git repo check (didn't work for bare repos)
authorAmélia Coutard-Sander <git@ameliathe1st.gay>
Mon, 2 Dec 2024 21:34:44 +0000 (22:34 +0100)
committerAmélia Coutard-Sander <git@ameliathe1st.gay>
Mon, 2 Dec 2024 21:34:44 +0000 (22:34 +0100)
handle-request.sh

index 32785ed368ba1ef15f5d6e47f0d5ba048bcae97b..97d8f4cddb359773988445773d7e0658d3294133 100755 (executable)
@@ -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"