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

Branch name is wrong when compiling from a git worktree #189

Closed
itainice opened this issue Mar 30, 2022 · 3 comments
Closed

Branch name is wrong when compiling from a git worktree #189

itainice opened this issue Mar 30, 2022 · 3 comments

Comments

@itainice
Copy link

itainice commented Mar 30, 2022

Describe the Bug

Using Visual Studio 2017 enterprise.
Create a new worktree and checkout some branch to that worktree.
Open/Compile my project from a worktree.
Visual Studio shows the correct branch name, but GitInfo has a wrong branch name.

Steps to Reproduce

Expected Behavior

Expecting to haver the correct branch name in ThisAssembly.Git.Branch.

The (wrong) branch name is probably taken from .git/HEAD of the main branch,. The correct value is in .git/worktrees/WorktreeName/HEAD .

@kzu
Copy link
Member

kzu commented Feb 6, 2023

I haven't encountered any usage of worktrees, so I don't know how important that feature is.

I'd accept a PR if provided.

Thanks!

@itainice
Copy link
Author

Just got version 2.3.0 and it looks OK.
I'll give it some more testing before closing the issue.

@kzu
Copy link
Member

kzu commented May 5, 2023

Closing for now, seems to be working as expected.

@kzu kzu closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2023
@devlooped devlooped locked and limited conversation to collaborators Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants