diffplug / diffplug/spotless

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

Aperta
#2,853 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
5.6k
Fork
559
Merge medio
1g 14h
PR unite (30g)
43

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
build-system
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.