Skip to content

Fix proxy-verifier storage for git worktrees - #12686

Merged
bneradt merged 1 commit into
apache:masterfrom
bneradt:fix_pv_and_worktree
Nov 21, 2025
Merged

bneradt merged 1 commit into
apache:masterfrom
bneradt:fix_pv_and_worktree

Conversation

@bneradt

@bneradt bneradt commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

PR #12664 changed proxy-verifier storage to be in
${CMAKE_SOURCE_DIR}/.git. Sadly, this fails in git worktrees where .git is a file pointing to the actual git directory. Use git rev-parse --git-common-dir to dynamically detect the correct git directory, which works for both regular repositories and worktrees. This ensures proxy-verifier binaries are stored in a shared location accessible to all worktrees.

PR apache#12664 changed proxy-verifier storage to be in
${CMAKE_SOURCE_DIR}/.git. Sadly, this fails in git worktrees where .git
is a file pointing to the actual git directory. Use git rev-parse
--git-common-dir to dynamically detect the correct git directory, which
works for both regular repositories and worktrees. This ensures
proxy-verifier binaries are stored in a shared location accessible to
all worktrees.
@bneradt bneradt added this to the 10.2.0 milestone Nov 21, 2025
@bneradt
bneradt requested a review from cmcfarlen November 21, 2025 18:10
@bneradt bneradt self-assigned this Nov 21, 2025
@bneradt
bneradt merged commit 1fc5b47 into apache:master Nov 21, 2025
15 checks passed
@bneradt
bneradt deleted the fix_pv_and_worktree branch November 21, 2025 20:02
bneradt added a commit to bneradt/trafficserver that referenced this pull request Nov 24, 2025
The git rev-parse --git-common-dir command added in apache#12686 returns an
absolute path to the relevant .git direcotry for worktrees.
Unfortunately, it does a relative path for "regular" non-worktree
clones. Without converting to an absolute path, PROXY_VERIFIER_PATH
becomes relative and fails to resolve correctly when passed to autest.
This adds get_filename_component to ensure GIT_COMMON_DIR is always
absolute, fixing the issue for both repository types.
bneradt added a commit that referenced this pull request Nov 24, 2025
The git rev-parse --git-common-dir command added in #12686 returns an
absolute path to the relevant .git direcotry for worktrees.
Unfortunately, it does a relative path for "regular" non-worktree
clones. Without converting to an absolute path, PROXY_VERIFIER_PATH
becomes relative and fails to resolve correctly when passed to autest.
This adds get_filename_component to ensure GIT_COMMON_DIR is always
absolute, fixing the issue for both repository types.
@github-project-automation github-project-automation Bot moved this to For v10.1.1 in ATS v10.1.x Dec 2, 2025
@cmcfarlen cmcfarlen moved this from For v10.1.1 to Picked v10.1.1 in ATS v10.1.x Dec 2, 2025
@cmcfarlen cmcfarlen modified the milestones: 10.2.0, 10.1.1 Dec 2, 2025
@cmcfarlen

Copy link
Copy Markdown
Contributor

Cherry-picked to 10.1.x branch

cmcfarlen pushed a commit that referenced this pull request Dec 2, 2025
PR #12664 changed proxy-verifier storage to be in
${CMAKE_SOURCE_DIR}/.git. Sadly, this fails in git worktrees where .git
is a file pointing to the actual git directory. Use git rev-parse
--git-common-dir to dynamically detect the correct git directory, which
works for both regular repositories and worktrees. This ensures
proxy-verifier binaries are stored in a shared location accessible to
all worktrees.

(cherry picked from commit 1fc5b47)
cmcfarlen pushed a commit that referenced this pull request Dec 2, 2025
The git rev-parse --git-common-dir command added in #12686 returns an
absolute path to the relevant .git direcotry for worktrees.
Unfortunately, it does a relative path for "regular" non-worktree
clones. Without converting to an absolute path, PROXY_VERIFIER_PATH
becomes relative and fails to resolve correctly when passed to autest.
This adds get_filename_component to ensure GIT_COMMON_DIR is always
absolute, fixing the issue for both repository types.

(cherry picked from commit e699cbe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Picked v10.1.1

Development

Successfully merging this pull request may close these issues.

3 participants