summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers
diff options
context:
space:
mode:
authorRichard Hansen <rhansen@bbn.com>2013-11-17 23:12:46 -0500
committerJunio C Hamano <gitster@pobox.com>2013-11-18 13:45:58 -0800
commit5105edd411bc472015d63eadaf1f826bebdc92e5 (patch)
treea89c0bc2ae43128da928aeb1684cf5310bf4d891 /contrib/remote-helpers
parent4945725c647a513326c3ce31dd99b91eefd97ede (diff)
downloadgit-5105edd411bc472015d63eadaf1f826bebdc92e5.tar.gz
test-hg.sh: eliminate 'local' bashism
Unlike bash, POSIX shell does not specify a 'local' command for declaring function-local variable scope. Except for IFS, the variable names are not used anywhere else in the script so simply remove the 'local'. For IFS, move the assignment to the 'read' command to prevent it from affecting code outside the function. Signed-off-by: Richard Hansen <rhansen@bbn.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers')
-rwxr-xr-xcontrib/remote-helpers/test-hg.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh
index fa7d17b224..ceef6b1917 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -54,14 +54,14 @@ check_bookmark () {
}
check_push () {
- local expected_ret=$1 ret=0 ref_ret=0 IFS=':'
+ expected_ret=$1 ret=0 ref_ret=0
shift
git push origin "$@" 2>error
ret=$?
cat error
- while read branch kind
+ while IFS=':' read branch kind
do
case "$kind" in
'new')