commit | 860f70f9f4206379361fd5af84c8fde31984b418 | [log] [tgz] |
---|---|---|
author | Tim Henigan <tim.henigan@gmail.com> | Fri Feb 24 18:12:58 2012 -0500 |
committer | Junio C Hamano <gitster@pobox.com> | Mon Feb 27 15:10:23 2012 -0800 |
tree | 74806c7f14b85fa2e1075722b49e3c7e75377a1e | |
parent | 48f359bfafa7db4c399fa13f17ccfea7c35f333b [diff] |
CodingGuidelines: do not use 'which' in shell scripts During the code review of a recent patch, it was noted that shell scripts must not use 'which $cmd' to check the availability of the command $cmd. The output of the command is not machine parseable and its exit code is not reliable across platforms. It is better to use 'type' to accomplish this task. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>