t3600: fix &&-chain breakage for setup commands
commit27a6625b13d7475d28f425adb2b7be221cf3c8e0
authorJeff King <peff@peff.net>
Fri, 20 Mar 2015 10:12:51 +0000 (20 06:12 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Mar 2015 17:20:17 +0000 (20 10:20 -0700)
treef9b96a03125d22f5c2646a85ceedffefdf018d19
parent53350a35a3c29417dfc64ae2b0d7a16ba43d1239
t3600: fix &&-chain breakage for setup commands

As with the earlier patch to fix "trivial" &&-chain
breakage, these missing "&&" operators are not a serious
problem (e.g., we do not expect "echo" to fail).

Ironically, however, inserting them shows that some of the
commands _do_ fail. Specifically, some of the tests start by
making sure we are at a commit with the string "content" in
the file "foo". However, running "git commit" may fail
because the previous test left us in that state already, and
there is nothing to commit.

We could remove these commands entirely, but they serve to
document the test's assumptions, as well as make it robust
when an earlier test has failed. We could use test_might_fail
to handle all cases, but that would miss an unrelated
failure to make the commit. Instead, we can just pass the
--allow-empty flag to git-commit, which means that it will
not complain if our setup is a noop.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3600-rm.sh