From 61d2c0d352452b2873a21e4dc33840e726d43c4e Mon Sep 17 00:00:00 2001 From: Shane Jaroch Date: Sat, 17 Jan 2026 07:47:39 -0500 Subject: [PATCH] more fixes to support container/root mount action --- tests/system-test-privacy-leaks.sh | 2 +- tests/system-test-repack.sh | 3 ++- tests/system-test.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/system-test-privacy-leaks.sh b/tests/system-test-privacy-leaks.sh index 8d553b6..17f323c 100755 --- a/tests/system-test-privacy-leaks.sh +++ b/tests/system-test-privacy-leaks.sh @@ -14,7 +14,7 @@ readonly tempdir trap 'rm -Rf -- "$tempdir"' EXIT # Ensure git-remote-gcrypt is in PATH -repo_root=$(git rev-parse --show-toplevel) +repo_root="${PWD}" test_version=$(git describe --tags --always --dirty 2>/dev/null || echo "test") cp "$repo_root/git-remote-gcrypt" "$tempdir/git-remote-gcrypt" sed "s/@@DEV_VERSION@@/$test_version/" "$tempdir/git-remote-gcrypt" >"$tempdir/git-remote-gcrypt.tmp" diff --git a/tests/system-test-repack.sh b/tests/system-test-repack.sh index ef876ac..0221683 100755 --- a/tests/system-test-repack.sh +++ b/tests/system-test-repack.sh @@ -46,7 +46,7 @@ readonly tempdir trap "rm -Rf -- '${tempdir}'" EXIT # Set up the PATH -repo_root=$(git rev-parse --show-toplevel) +repo_root="${PWD}" test_version=$(git describe --tags --always --dirty 2>/dev/null || echo "test") cp "$repo_root/git-remote-gcrypt" "$tempdir/git-remote-gcrypt" sed -i "s/@@DEV_VERSION@@/$test_version/" "$tempdir/git-remote-gcrypt" @@ -112,6 +112,7 @@ print_info "Step 2: Creating repository with large random files..." { git init -- "${tempdir}/first" cd "${tempdir}/first" + git checkout -b "${default_branch}" for ((i = 0; i < num_commits; ++i)); do for ((j = 0; j < files_per_commit; ++j)); do file_index=$((i * files_per_commit + j)) diff --git a/tests/system-test.sh b/tests/system-test.sh index f51a791..71ef23b 100755 --- a/tests/system-test.sh +++ b/tests/system-test.sh @@ -73,7 +73,7 @@ trap "rm -Rf -- '${tempdir}'" EXIT # Set up the PATH to favor the version of git-remote-gcrypt from the repository # rather than a version that might already be installed on the user's system. # We also copy it to tempdir to inject a version number for testing. -repo_root=$(git rev-parse --show-toplevel) +repo_root="${PWD}" test_version=$(git describe --tags --always --dirty 2>/dev/null || echo "test") cp "$repo_root/git-remote-gcrypt" "$tempdir/git-remote-gcrypt" sed "s/@@DEV_VERSION@@/$test_version/" "$tempdir/git-remote-gcrypt" > "$tempdir/git-remote-gcrypt.tmp" -- 2.52.0