Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix retrieving git worktree path #1008

Merged
merged 4 commits into from
Nov 29, 2024
Merged

Fix retrieving git worktree path #1008

merged 4 commits into from
Nov 29, 2024

Conversation

bart-jaskulski
Copy link
Contributor

@bart-jaskulski bart-jaskulski commented May 19, 2022

Q A
Branch master for features and deprecations
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Documented? no
Fixed tickets

@veewee Actually, I've made a bad assumption previously submitting PR (#1003) for git worktree path - git does store absolute path in .git file, but that's absolute path to the current worktree, while hooks are fired from common worktree root directory.

The hierarchy looks something like:

git-worktree
 > hooks
 > worktrees
   > worktree-1
      > commondir
   > worktree-2
      > commondir
worktree-1
  > .git
worktree-2
  > .git

With current patch, we are actually getting absolute path to worktree and reading the path from commondir file, which usually points up in hierarchy, to the root of git directory.

@veewee
Copy link
Contributor

veewee commented May 27, 2022

Thanks for reporting @bart-jaskulski.

Configured myself some worktrees locally to see what is going on exactly.
Looks like this implementation works. I did add some minor comments to make it less confusing for future reference.

@veewee
Copy link
Contributor

veewee commented Aug 26, 2022

@bart-jaskulski Got any time to look at the comments I added above? Is there anything else I can do to get this merged?

@veewee veewee changed the base branch from master to v2.x June 18, 2023 13:29
@veewee
Copy link
Contributor

veewee commented Nov 26, 2024

We notices this PR became inactive. If you wish to continue, feel free to pick it up again.
If not, we will be closing this PR soon. Thanks for your understanding.

@bart-jaskulski
Copy link
Contributor Author

Sorry, that I left this PR dangling 💦

I will complete this by the end of the week 🙏

Signed-off-by: Bart Jaskulski <[email protected]>
@veewee
Copy link
Contributor

veewee commented Nov 29, 2024

@bart-jaskulski Thanks, this looks very nice!

Is it ready for merge or is there still something missing?

@bart-jaskulski
Copy link
Contributor Author

Absolutely ready 💪

@veewee veewee added this to the 2.10.0 milestone Nov 29, 2024
@veewee veewee merged commit 6e95a02 into phpro:v2.x Nov 29, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants