• Jim Hill's avatar
    pre-push.sample: remove unnecessary and misleading IFS=' ' · 3af74cfb
    Jim Hill authored
    The sample hook explicitly sets IFS to SP and nothing else so that
    the "read" used in the per-ref while loop that iterates over
    "<localref> SP <localsha1> SP <remoteref> SP <remotesha>" records,
    where we know refs and sha1s will not have SPs, would split them
    While this is not wrong per-se, it is not necessary; because we know
    these fields do not contain HT or LF, either, we can simply leave
    IFS the default.
    This will also prevent those who cut and paste from this sample from
    getting bitten when they write things in the per-ref loop that need
    splitting with the default $IFS (e.g. use $(git rev-list ...) to
    produce one-record-per-line output).
    Signed-off-by: default avatarJim Hill <gjthill@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
hooks--pre-push.sample 1.32 KB