The preferred form for a command substitution is $() over ``. Use this form for the command substitution in the sample hook. Signed-off-by: Denton Liu <liu.denton@xxxxxxxxx> --- templates/hooks--pre-push.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/hooks--pre-push.sample b/templates/hooks--pre-push.sample index 6187dbf439..64b5707553 100755 --- a/templates/hooks--pre-push.sample +++ b/templates/hooks--pre-push.sample @@ -41,7 +41,7 @@ do fi # Check for WIP commit - commit=`git rev-list -n 1 --grep '^WIP' "$range"` + commit="$(git rev-list -n 1 --grep '^WIP' "$range")" if [ -n "$commit" ] then echo >&2 "Found WIP commit in $local_ref, not pushing" -- 2.28.0.618.gf4bc123cb7