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>

Jeff King committed Mar 25, 2015 at 01:25 UTC ecb590a9de231a3312527da023cd5b60328ae22e
1 file changed +1 -1
t/perf/perf-lib.sh
+1 -1
@@ -91,7 +91,7 @@ test_perf_create_repo_from () {
91 */objects|*/hooks|*/config)
92 ;;
93 *)
94 - cp -R "$stuff" . || break
94 + cp -R "$stuff" . || exit 1
95 ;;
96 esac
97 done &&