Repository navigation
fix: keep native working directories for SCM version queries - #316
Open
mayankdhingra02 wants to merge 1 commit into
Open
mayankdhingra02 wants to merge 1 commit into
mayankdhingra02 wants to merge 1 commit into
Conversation
MSYS Git may return a repository path that native Python cannot open. Use its caller-provided working directory for repository-wide queries after the existing repository discovery and shallow-clone check. Cover metadata builds and Git states from root, nested and symlink paths, including emulated MSYS output and native-path controls. Signed-off-by: Mayank Dhingra <mayankdhingra02@gmail.com>
❌ Deploy Preview for pdm-backend-docs failed. Why did it fail? →
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MSYS Git can return a POSIX repository path that native Windows Python cannot use as a subprocess working directory. Keep the caller's already-working directory for subsequent repository-wide Git queries, preserving the existing repository discovery and shallow-clone diagnostic.
Fixes #197.
Adds 36 regression/control cases for tagged, untagged, dirty and post-tag repositories; nested and symlink paths; wheel/editable metadata; shallow clones; and non-repository/bare-repository inputs. The MSYS tests change only
rev-parse --show-topleveloutput; all Git commands and metadata builds are real.Validation on macOS:
pdm run pytest -vv tests: CPython 3.9–3.14 each 131 passed, 1 skipped; PyPy 3.9: 128 passed, 4 skipped. Includes Git and Mercurial tests.pre-commit run --all-files, wheel/sdist/editable builds, Twine checks and strict MkDocs build pass.Native Windows/MSYS and Linux execution remain for CI; the local regression emulates the reported path spelling. Python 3.12's tar extraction warning also occurs on the unchanged base.
The Netlify preview currently fails while rendering
api.mdwithHighlight.__init__()missing itsmdargument. The same failure occurs on the unchanged base and this branch with all 36 logged Netlify package versions and Python 3.10.22 on macOS. The project's locked strict MkDocs build passes locally.