]> git.ipfire.org Git - thirdparty/git.git/commit - templates/hooks--pre-push.sample
hooks--pre-push.sample: modernize script
authorDenton Liu <liu.denton@gmail.com>
Wed, 23 Sep 2020 09:38:43 +0000 (02:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Sep 2020 16:31:45 +0000 (09:31 -0700)
commit6a117da6e523a82115733682f4d3f59755897d5a
treedbb93c108c236466465959aa5c313c6981148c80
parent47ae905ffb98cc4d4fd90083da6bc8dab55d9ecc
hooks--pre-push.sample: modernize script

The preferred form for a command substitution is $() over ``. Use this
form for the command substitution in the sample hook.

The preferred form for conditional tests is to use `test` over [].
Replace [] with `test`.

Finally, replace all instances of "sha" with "oid".

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
templates/hooks--pre-push.sample