Skip to content

fix: installGitHook inside a worktree#20953

Merged
criticalAY merged 1 commit intoankidroid:mainfrom
david-allison:fix-worktree
May 5, 2026
Merged

fix: installGitHook inside a worktree#20953
criticalAY merged 1 commit intoankidroid:mainfrom
david-allison:fix-worktree

Conversation

@david-allison
Copy link
Copy Markdown
Member

Note

Assisted-by: Claude Opus 4.7 - all

Purpose / Description

In a worktree, .git is a file

Fixes

Approach

  • git rev-parse --git-path hooks

How Has This Been Tested?

  • gradlew -p /Users/davidallison/StudioProjects/Anki-Android :AnkiDroid:installGitHook --rerun-tasks
  • /Users/davidallison/StudioProjects/Anki-Android/.claude/worktrees/parallel-A/gradlew -p /Users/davidallison/StudioProjects/Anki-Android/.claude/worktrees/parallel-A :AnkiDroid:installGitHook --rerun-tasks

Learning

https://git-scm.com/docs/git-rev-parse#Documentation/git-rev-parse.txt---git-pathpath

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

In a worktree, `.git` is a file

Fixes 20952

Assisted-by: Claude Opus 4.7 - all
@david-allison david-allison added the Review High Priority Request for high priority review label May 5, 2026
@BrayanDSO BrayanDSO added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels May 5, 2026
Copy link
Copy Markdown
Contributor

@criticalAY criticalAY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh nicee thanks!

@criticalAY criticalAY added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels May 5, 2026
@criticalAY criticalAY added this pull request to the merge queue May 5, 2026
Merged via the queue into ankidroid:main with commit 90ffcaf May 5, 2026
19 checks passed
@github-actions github-actions Bot removed Review High Priority Request for high priority review Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) labels May 5, 2026
@github-actions github-actions Bot added this to the 2.25 release milestone May 5, 2026
@david-allison david-allison deleted the fix-worktree branch May 5, 2026 19:41
@david-allison
Copy link
Copy Markdown
Member Author

Thanks so much, cherry picking this one in was frustrating!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

installGitHook fails inside a worktree

3 participants