perf-lib: fix ignored exit code inside loop

When copying the test repository, we try to detect whether
the copy succeeded. However, most of the heavy lifting is
done inside a for loop, where our "break" will lose the exit
code of the failing "cp". We can take advantage of the fact
that we are in a subshell, and just "exit 1" to break out
with a code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2015-03-25 01:25:55 -04:00 committed by Junio C Hamano
parent 65e6758767
commit ecb590a9de

View file

@ -91,7 +91,7 @@ test_perf_create_repo_from () {
*/objects|*/hooks|*/config)
;;
*)
cp -R "$stuff" . || break
cp -R "$stuff" . || exit 1
;;
esac
done &&