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

;bin: git: make ensure_git more robust #2311

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

larsks
Copy link
Contributor

@larsks larsks commented Jan 2, 2025

Instead of manually checking for a .git directory, ask git to check whether
or not we are in a work tree using 'git rev-parse --is-inside-work-tree'.
This takes care of things like being in a subdirectory of a work tree, or
someone having GIT_DIR pointing somewhere other than .git, etc.

Instead of manually checking for a .git directory, ask git to check whether
or not we are in a work tree using 'git rev-parse --is-inside-work-tree'.
This takes care of things like being in a subdirectory of a work tree, or
someone having GIT_DIR pointing somewhere other than .git, etc.
@simonmichael simonmichael merged commit d447d70 into simonmichael:master Jan 22, 2025
1 check passed
@simonmichael
Copy link
Owner

Thank you!

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.

2 participants