diffplug / diffplug/spotless

Git pre-push hook should be generated to location defined by `core.hooksPath`

Ouverte
#2,853 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
5.6k
Forks
559
Merge moyen
1 j 14 h
PR mergées (30 j)
43

Description

In our project, we define all our git hooks at `.githooks`, so we can version control them and have them shared amongst our team. We recommend that those in our project set up the git hooks by running `git config --local unset core.hooksPath`.

The git pre-push hook generated by `./gradlew spotlessInstallGitPrePushHook` writes the hook to `.git/hooks`, instead of wherever `git config core.hooksPath` is pointing to. By default, `git config core.hooksPath` is equivalent to `.git/hooks`, but it can be customised to something else, like in our case.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start with the ./gradlew spotlessInstallGitPrePushHook entry point and trace where it chooses the hook destination. Check how the configured core.hooksPath and the default .git/hooks location are handled. Done means the generated pre-push hook is written to the configured path, while retaining the default behavior when no custom path is set.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
build-system
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.