source: Klonkt/.beads/hooks/prepare-commit-msg@ 5b22ea9

main
Last change on this file since 5b22ea9 was 5b22ea9, checked in by Robin <robin@…>, 4 months ago

bd init: initialize beads issue tracking

  • Property mode set to 100644
File size: 821 bytes
Line 
1#!/usr/bin/env sh
2# --- BEGIN BEADS INTEGRATION v1.0.3 ---
3# This section is managed by beads. Do not remove these markers.
4if 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 prepare-commit-msg "$@"
9 _bd_exit=$?
10 if [ $_bd_exit -eq 124 ]; then
11 echo >&2 "beads: hook 'prepare-commit-msg' timed out after ${_bd_timeout}s — continuing without beads"
12 _bd_exit=0
13 fi
14 else
15 bd hooks run prepare-commit-msg "$@"
16 _bd_exit=$?
17 fi
18 if [ $_bd_exit -eq 3 ]; then
19 echo >&2 "beads: database not initialized — skipping hook 'prepare-commit-msg'"
20 _bd_exit=0
21 fi
22 if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
23fi
24# --- END BEADS INTEGRATION v1.0.3 ---
Note: See TracBrowser for help on using the repository browser.