Merge branch 'nd/maint-work-tree-fix' into maint
[gitweb.git] / templates / hooks--update
index 9d3795c6d055d3ca2b50ac0607607037cb2b8142..d8c76264beaf198f1f3558ca8429349c8eab9ead 100644 (file)
@@ -42,7 +42,7 @@ fi
 
 # --- Check types
 # if $newrev is 0000...0000, it's a commit to delete a branch
-if [ -z "${newrev##0*}" ]; then
+if [ "$newrev" = "0000000000000000000000000000000000000000" ]; then
        newrev_type=commit
 else
        newrev_type=$(git-cat-file -t $newrev)