From: Junio C Hamano Date: Fri, 21 Sep 2012 19:42:00 GMT Subject: Re: [PATCH v2 14/14] Add git-check-ignore sub-command Message-ID: <7v392b5fjr.fsf@alter.siamese.dyndns.org> In-Reply-To: <1348170383-15751-15-git-send-email-git@adamspiers.org> Adam Spiers writes: > +expect_in () { > + dest="$HOME/expected-$1" text="$2" > + if test -z "$text" > + then > + >"$dest" # avoid newline > + else > + echo -e "$text" >"$dest" This breaks when your shell is not "bash". > +test_check_ignore () { > + args="$1" expect_code="${2:-0}" global_args="$3" > + > + init_vars && > + rm -f "$HOME/stdout" "$HOME/stderr" "$HOME/cmd" && > + echo $(which git) $global_args check-ignore $quiet_opt $verbose_opt $args \ > + >"$HOME/cmd" && Don't use which in scripts. Is this just leftover cruft from debugging?