perf: make the tests work without a worktree
In regular repositories $source_git and $objects_dir contain relative paths based on $source. Go there to allow cp to resolve them. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
e4cfe74cd0
commit
e2522f2aca
|
@ -84,6 +84,7 @@ test_perf_create_repo_from () {
|
||||||
objects_dir="$(git -C "$source" rev-parse --git-path objects)"
|
objects_dir="$(git -C "$source" rev-parse --git-path objects)"
|
||||||
mkdir -p "$repo/.git"
|
mkdir -p "$repo/.git"
|
||||||
(
|
(
|
||||||
|
cd "$source" &&
|
||||||
{ cp -Rl "$objects_dir" "$repo/.git/" 2>/dev/null ||
|
{ cp -Rl "$objects_dir" "$repo/.git/" 2>/dev/null ||
|
||||||
cp -R "$objects_dir" "$repo/.git/"; } &&
|
cp -R "$objects_dir" "$repo/.git/"; } &&
|
||||||
for stuff in "$source_git"/*; do
|
for stuff in "$source_git"/*; do
|
||||||
|
@ -94,7 +95,9 @@ test_perf_create_repo_from () {
|
||||||
cp -R "$stuff" "$repo/.git/" || exit 1
|
cp -R "$stuff" "$repo/.git/" || exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done &&
|
done
|
||||||
|
) &&
|
||||||
|
(
|
||||||
cd "$repo" &&
|
cd "$repo" &&
|
||||||
git init -q && {
|
git init -q && {
|
||||||
test_have_prereq SYMLINKS ||
|
test_have_prereq SYMLINKS ||
|
||||||
|
|
Loading…
Reference in New Issue