my dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

10 lines
281 B

  1. #!/usr/bin/env bash
  2. message="$(head -n 1 "$1")"
  3. if ! grep --extended-regexp --silent '^([0-9a-z_,]+\:|Merge|fixup\!)\s.*$' <<<"$message"; then
  4. echo 'commit message must be in the format "<software>: <message>"' >&2
  5. echo "rejecting message \`$message\`" >&2
  6. exit 1
  7. fi