1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-05 08:47:56 +01:00
git/templates
Jim Hill 3af74cfb15 pre-push.sample: remove unnecessary and misleading IFS=' '
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
correctly.

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: Jim Hill <gjthill@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-22 10:27:42 -08:00
..
.gitignore
branches--
hooks--applypatch-msg.sample
hooks--commit-msg.sample
hooks--post-update.sample
hooks--pre-applypatch.sample
hooks--pre-commit.sample sample pre-commit hook: use --bool when retrieving config var 2013-09-24 12:26:49 -07:00
hooks--pre-push.sample pre-push.sample: remove unnecessary and misleading IFS=' ' 2014-12-22 10:27:42 -08:00
hooks--pre-rebase.sample
hooks--prepare-commit-msg.sample
hooks--update.sample templates/hooks--update.sample: use a lowercase "usage:" string 2013-02-24 13:31:09 -08:00
info--exclude
Makefile
this--description