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

Support git repository checkouts using git worktree #5

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

cgrindel
Copy link
Contributor

When working with repository code using git worktree, the worktree's .git is a file that references the location of the worktree's git files. This location (i.e., directory) only contains pertinent data for that worktree. In addition, it has a file called commondir that specifies the location of the rest of the repository files.

This PR updates git-descrive-semver to identify whether the current worktree uses the commondir mechanism. If so, it enables support for this mechanism in go-git.

* Started adding tests

* Finish tests for FindGitDir

* Refactor setup code

* Add tests for shouldEnableCommondDir

* Remove commented code
@choffmeister
Copy link
Owner

Hello @cgrindel. Sorry for the delay, I completely missed your PR. Will check it today.

@cgrindel
Copy link
Contributor Author

@choffmeister It does not look like the status checks started. Is there something that we can do try starting them, again?

@gedw99
Copy link

gedw99 commented Dec 7, 2023

Hey. I would appreciate if this can get merged.

Copy link
Owner

@choffmeister choffmeister left a comment

Choose a reason for hiding this comment

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

LGTM. Sorry for even more delay. I just have little time for these small side projects and always forget about these PRs again.

@choffmeister choffmeister merged commit cc4b917 into choffmeister:main Dec 9, 2023
@choffmeister
Copy link
Owner

@cgrindel No sure if still relevant for you after my long delay, but finally merged and released https://github.com/choffmeister/git-describe-semver/releases/tag/v0.4.0

@cgrindel cgrindel deleted the support_git_worktree branch December 9, 2023 13:30
@gedw99
Copy link

gedw99 commented Dec 9, 2023

thank you @choffmeister

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.

3 participants