Closed mabruzzo closed 1 month ago
Perhaps it would be simpler to switch to the gitpython
module. For example, git rev-parse HEAD
could be replaced with the following:
import git
repo = git.Repo(search_parent_directories=True)
sha = repo.head.object.hexsha
Perhaps it would be simpler to switch to the
gitpython
module. For example,git rev-parse HEAD
could be replaced with the following:import git repo = git.Repo(search_parent_directories=True) sha = repo.head.object.hexsha
I'm a little hesitant to do this for the single reason that this script is run during configuration of the core Grackle c library (and I'm not sure it's a great idea to require people to manually install a python dependency to do this...). But, maybe a compromise is that we use git-python if it's available?
Honestly, I think the existing system seems fine for 99% of cases. The only reason I proposed this change was because @ChristopherBignamini mentioned that he encountered an issue about 2 weeks ago. I'm not entirely sure what his issue is, so I'm not completely sure if my change even fixes it. (But, he did mention that they encounter similar issues on that system when trying to compile other software that tries to access git during the build-process)
This consists of 2 commits:
flake8
(I also appliedruff format
)