summaryrefslogtreecommitdiff
path: root/t/perf/perf-lib.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-03-25 05:25:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-25 17:21:23 (GMT)
commitecb590a9de231a3312527da023cd5b60328ae22e (patch)
tree323ee5c1a243b8105a53a42489da0659005135ec /t/perf/perf-lib.sh
parent65e6758767be228791a76e02e971c5565058ec79 (diff)
downloadgit-ecb590a9de231a3312527da023cd5b60328ae22e.zip
git-ecb590a9de231a3312527da023cd5b60328ae22e.tar.gz
git-ecb590a9de231a3312527da023cd5b60328ae22e.tar.bz2
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>
Diffstat (limited to 't/perf/perf-lib.sh')
-rw-r--r--t/perf/perf-lib.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index a8c9574..5cf74ed 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -91,7 +91,7 @@ test_perf_create_repo_from () {
*/objects|*/hooks|*/config)
;;
*)
- cp -R "$stuff" . || break
+ cp -R "$stuff" . || exit 1
;;
esac
done &&