Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v2 14/14] Add git-check-ignore sub-command

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:50

Adam Spiers [off-list ref] 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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help