Re: [PATCH v2 14/14] Add git-check-ignore sub-command
Adam Spiers <git@adamspiers.org> writes:
Show 7 quoted lines
> +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".
Show 7 quoted lines
> +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?