Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d0c20dcb1 |
@@ -19,8 +19,8 @@ Rationale, Design, TODO, License, Author) if any are still missing.
|
|||||||
|
|
||||||
# Completed Steps
|
# Completed Steps
|
||||||
|
|
||||||
- 2026-10-01: `script/install-precommit` asks git where hooks live, so
|
- 2026-10-01: `script/install-precommit` asks git for the repository's git
|
||||||
`make hooks` also works where `.git` is a file (closes #129).
|
directory, so `make hooks` also works where `.git` is a file (closes #129).
|
||||||
- 2026-09-29: the live-DNS test package is renamed `internal/livednstest` and
|
- 2026-09-29: the live-DNS test package is renamed `internal/livednstest` and
|
||||||
added to the `test-support` `deny` list in `.golangci.yml`, so `make lint`
|
added to the `test-support` `deny` list in `.golangci.yml`, so `make lint`
|
||||||
fails when program code imports it (closes #164).
|
fails when program code imports it (closes #164).
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
cd "$ROOT"
|
cd "$ROOT"
|
||||||
# Ask git where hooks live: .git is a file, not a directory, in some
|
# Ask git for the repository's own git directory: .git is a file, not
|
||||||
# checkouts (for example a clone made with --separate-git-dir).
|
# a directory, in some checkouts (for example a clone made with
|
||||||
hooks="$(git rev-parse --git-path hooks)"
|
# --separate-git-dir). core.hooksPath is deliberately not followed, so
|
||||||
|
# the hook is never written outside this repository.
|
||||||
|
hooks="$(git rev-parse --git-common-dir)/hooks"
|
||||||
mkdir -p "$hooks"
|
mkdir -p "$hooks"
|
||||||
hook="$hooks/pre-commit"
|
hook="$hooks/pre-commit"
|
||||||
printf '#!/bin/sh\nset -e\nscript/precommit\n' > "$hook"
|
printf '#!/bin/sh\nset -e\nscript/precommit\n' > "$hook"
|
||||||
|
|||||||
Reference in New Issue
Block a user