From: Johannes Schindelin Date: Fri, 13 May 2016 13:25:58 +0000 (+0200) Subject: perf: make the tests work in worktrees X-Git-Tag: v2.9.0-rc0~7^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/7501b59210906c89747dca1c44e15d8c2214c01d?ds=inline;hp=7501b59210906c89747dca1c44e15d8c2214c01d perf: make the tests work in worktrees This patch makes perf-lib.sh more robust so that it can run correctly even inside a worktree. For example, it assumed that $GIT_DIR/objects is the objects directory (which is not the case for worktrees) and it used the commondir file verbatim, even if it contained a relative path. Furthermore, the setup code expected `git rev-parse --git-dir` to spit out a relative path, which is also not true for worktrees. Let's just change the code to accept both relative and absolute paths, by avoiding the `cd` into the copied working directory. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano ---