The test for an unmolested file wouldn't fail properly if the file had been
removed or replaced by something other than a regular file. This fixes it.
Signed-off-by: Lars Hjemli <redacted>
Signed-off-by: Junio C Hamano <redacted>
then
echo "[OOPS] update should have failed"
false
- elif test -f lib && test "$(cat lib)" != "hello"
+ elif test "$(cat lib)" != "hello"
then
echo "[OOPS] update failed but lib file was molested"
false