February 2021 in Darker: Addressing Git-related issues and pre-commit hook challenges #638
akaihola
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This month, our focus shifted towards resolving Git-related issues and improving Darker's compatibility with pre-commit hooks. We made progress in understanding and addressing a critical bug where Darker crashes when
GIT_DIR
is set to a relative path (#112). This issue, discovered during attempts to use Darker in a git commit hook, highlighted the need for our tool to be more robust in handling various git configurations.We explored several approaches to resolve the
GIT_DIR
issue, including normalizing git environment variables and simplifying our directory handling logic. The discussion revealed the complexity of supporting different IDE setups and git workflows. We're considering a solution that accounts for various combinations ofGIT_DIR
andGIT_WORK_TREE
settings to ensure Darker functions correctly across different environments.Additionally, we addressed a new issue related to pre-commit hook integration (#113). Users reported errors when trying to use Darker with pre-commit, specifically regarding the
PRE_COMMIT_FROM_REF
andPRE_COMMIT_TO_REF
environment variables. This highlighted a potential misunderstanding in how Darker interacts with pre-commit hooks during different git operations. We're investigating whether adjustments are needed in our documentation or implementation to clarify the correct usage of Darker with pre-commit, particularly for commit hooks versus push hooks.Beta Was this translation helpful? Give feedback.
All reactions