setuptools_scm icon indicating copy to clipboard operation
setuptools_scm copied to clipboard

Clean up _git_toplevel()

Open rossburton opened this issue 9 months ago • 2 comments
trafficstars

Instead of asking git what the relative path of the current directory is from the root of the repository and then reverse-engineering the root, simply call git rev-parse --show-toplevel.

This option was added in git 1.7.0 back in 2010, so I think it's fair to assume it exists.

rossburton avatar Feb 13 '25 15:02 rossburton