Open stepheneb opened 3 years ago
My notes investigating the issue:
This section of code: https://github.com/gitx/gitx/blob/master/Classes/git/PBGitIndex.m#L356-L381
Includes:
BOOL success = [self.repository executeHook:@"pre-commit" error:&error];
executeHook
is defined here:
https://github.com/gitx/gitx/blob/master/Classes/git/PBGitRepository.m#L1118-L1181
Is there other existing code that reads from an existing git configuration file that I could adapt to use here?
I'm happy to approve a pull request when you'll create one
I submitted a fix for this in #307.
Am using gitx built from the latest commit on the master branch: https://github.com/gitx/gitx/commit/d0bddcc47
I setup a git pre-commit hook to check for occurrences of
debugger
statements in javascript.When this pre-commit hook is located in the default location:
.git/hooks/pre-commit
it runs properly in both gitx and the git cli.I wanted to keep track of the git hooks in a directory managed by git so I moved the pre-commit hook here:
.githooks/pre-commit
.I then set the git configuration to use that new directory:
The pre-commit hook is run correctly when using the git cli.
However no warning is now displayed when committing a javascript file with a
debugger
statement using gitx.Am not yet sure if this is a bug in gitx or one of the libraries it pulls in.
Any tips on where to look for this bug are welcome.
The repo where this occurs: https://github.com/stepheneb/cfa-own-electron (this is a large repo). If helpful I can create a minimal repo to demonstrate the issue.
file:
.githooks/pre-commit