diffplug / diffplug/spotless

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

Offen
#2,853 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
5.6k
Forks
559
Ø Merge
1 T. 14 Std.
Gemergte PRs (30 T.)
43

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.