Skip to content

fix: use resolve() instead of absolute() in verify_git_repo_dir#1444

Open
aconal-com wants to merge 1 commit into
python-semantic-release:masterfrom
aconal-com:fix/monorepo-repo-dir-warning
Open

fix: use resolve() instead of absolute() in verify_git_repo_dir#1444
aconal-com wants to merge 1 commit into
python-semantic-release:masterfrom
aconal-com:fix/monorepo-repo-dir-warning

Conversation

@aconal-com
Copy link
Copy Markdown

In monorepo setups where repo_dir='..' is configured for a subpackage, Path('..').absolute() returns /path/to/package/.. rather than the resolved /path/to/repo. Using resolve() properly handles symlinks and normalizes paths, preventing false 'Found .git/ in higher parent directory' warnings.

Fixes #1418

@aconal-com aconal-com force-pushed the fix/monorepo-repo-dir-warning branch from c6ec517 to b1868fd Compare May 9, 2026 21:17
In monorepo setups where repo_dir='..' is configured for a subpackage,
Path('..').absolute() returns /path/to/package/.. rather than the resolved
/path/to/repo. Using resolve() properly handles symlinks and normalizes
paths, preventing false 'Found .git/ in higher parent directory' warnings.

Fixes python-semantic-release#1418
@aconal-com aconal-com force-pushed the fix/monorepo-repo-dir-warning branch from b1868fd to bf5fdff Compare May 9, 2026 21:24
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.

False "Found .git/ in higher parent directory" warning in monorepo setup

2 participants