Skip to content

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

Merged
codejedi365 merged 7 commits into
python-semantic-release:masterfrom
aconal-com:fix/monorepo-repo-dir-warning
Jul 6, 2026
Merged

fix: use resolve() instead of absolute() in verify_git_repo_dir#1444
codejedi365 merged 7 commits into
python-semantic-release:masterfrom
aconal-com:fix/monorepo-repo-dir-warning

Conversation

@aconal-com

Copy link
Copy Markdown
Contributor

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 2 times, most recently from b1868fd to bf5fdff Compare May 9, 2026 21:24
@codejedi365 codejedi365 force-pushed the fix/monorepo-repo-dir-warning branch 2 times, most recently from 46fe586 to a35990c Compare July 5, 2026 21:04
@codejedi365 codejedi365 force-pushed the fix/monorepo-repo-dir-warning branch from a35990c to f169563 Compare July 5, 2026 23:55
@codejedi365 codejedi365 force-pushed the fix/monorepo-repo-dir-warning branch 2 times, most recently from aab052c to 8813112 Compare July 6, 2026 00:08
aniketkarne and others added 3 commits July 5, 2026 18:18
…epos configured with `..`

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

Resolves: python-semantic-release#1418

Co-authored-by: Aniket Karne <aniketkarne@gmail.com>
Co-authored-by: codejedi365 <codejedi365@users.noreply.github.com>
Signed-off-by: codejedi365 <codejedi365@users.noreply.github.com>
@codejedi365 codejedi365 force-pushed the fix/monorepo-repo-dir-warning branch from 8813112 to 6b61018 Compare July 6, 2026 00:19
@codejedi365 codejedi365 merged commit 7a1f822 into python-semantic-release:master Jul 6, 2026
31 of 36 checks passed
@codejedi365

Copy link
Copy Markdown
Contributor

@aconal-com, Thank you for the contribution. A few tips for contributing:

  • make sure that your suggested test case not only succeeds after your fix but it should also fail without your fix. In this case it didn't fail which means the test case did not fully replicate your failure environment. Not to worry I figured it out but it will take longer to get your PRs merged if this happens.

  • Make sure to use the PR template that is provided when submitting PRs.

@codejedi365

Copy link
Copy Markdown
Contributor

🎉 This PR has been published as part of v10.6.1 🎉

You can find more information about this release on the GitHub Releases page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants