Hi Eric, On Wed, 11 May 2016, Eric Sunshine wrote: > On Wed, May 11, 2016 at 4:42 AM, Johannes Schindelin > <johannes.schindelin@xxxxxx> wrote: > > 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 <johannes.schindelin@xxxxxx> > > --- > > diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh > > @@ -80,22 +80,22 @@ test_perf_create_repo_from () { > > - source_git=$source/$(cd "$source" && git rev-parse --git-dir) > > + source_git="$(cd "$source" && git rev-parse --git-dir)" > > + objects_dir="$(cd "$source" && git rev-parse --git-path objects)" > > Would it be out of the scope of this patch to simplify these by using -C? > > source_git=$(git -C "$source" rev-parse --git-dir) Thanks for educating me: I had not known about this option. Will send another iteration in a moment. Ciao, Dscho -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html