main
|
Last change
on this file since 8b65e67 was 76e9cfd, checked in by robo <roboburr@…>, 4 months ago |
|
bd init: initialize beads issue tracking
|
-
Property mode
set to
100644
|
|
File size:
789 bytes
|
| Rev | Line | |
|---|
| [5b22ea9] | 1 | #!/usr/bin/env sh
|
|---|
| [76e9cfd] | 2 | # --- BEGIN BEADS INTEGRATION v1.0.4 ---
|
|---|
| [5b22ea9] | 3 | # This section is managed by beads. Do not remove these markers.
|
|---|
| 4 | if command -v bd >/dev/null 2>&1; then
|
|---|
| 5 | export BD_GIT_HOOK=1
|
|---|
| 6 | _bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
|
|---|
| 7 | if command -v timeout >/dev/null 2>&1; then
|
|---|
| 8 | timeout "$_bd_timeout" bd hooks run pre-commit "$@"
|
|---|
| 9 | _bd_exit=$?
|
|---|
| 10 | if [ $_bd_exit -eq 124 ]; then
|
|---|
| 11 | echo >&2 "beads: hook 'pre-commit' timed out after ${_bd_timeout}s — continuing without beads"
|
|---|
| 12 | _bd_exit=0
|
|---|
| 13 | fi
|
|---|
| 14 | else
|
|---|
| 15 | bd hooks run pre-commit "$@"
|
|---|
| 16 | _bd_exit=$?
|
|---|
| 17 | fi
|
|---|
| 18 | if [ $_bd_exit -eq 3 ]; then
|
|---|
| 19 | echo >&2 "beads: database not initialized — skipping hook 'pre-commit'"
|
|---|
| 20 | _bd_exit=0
|
|---|
| 21 | fi
|
|---|
| 22 | if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
|---|
| 23 | fi
|
|---|
| [76e9cfd] | 24 | # --- END BEADS INTEGRATION v1.0.4 ---
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.