]> _ Git - git-shell-commands.git/commitdiff
Add check for README.md
authormivirl <>
Thu, 11 Jan 2024 06:26:14 +0000 (00:26 -0600)
committermivirl <>
Thu, 11 Jan 2024 06:26:14 +0000 (00:26 -0600)
create-repo

index 8e23d83110babe83a9ba08879f836593221e2f9f..3064d07f2f313fc14415f0e1e9b00f3be4068652 100755 (executable)
@@ -18,7 +18,9 @@ git init --bare
 
 cat << EOF > hooks/post-receive
 #!/bin/sh
-git cat-file blob HEAD:README.md | cmark > README.html
+if [ git cat-file -e HEAD:README.md ]; then
+       git cat-file blob HEAD:README.md | cmark > README.html
+fi
 EOF
 
 chmod +x hooks/post-receive