systemSetup

system setup, configuration and dotfiles
git clone https://noulin.net/git/systemSetup.git
Log | Files | Refs | README | LICENSE

prepare-commit-msg (384B)


      1 #!/bin/bash
      2 
      3 if [ "$2" == "" ] ; then
      4   # add diff stat
      5   #not good, message is not empty and changes are always commited - git diff --staged --stat >> "$1"  2>/dev/null
      6 
      7   # add diff stat and comment lines
      8   #git diff --staged --stat 2> /dev/null | awk '{ printf "#"; print}' >> "$1"  2>/dev/null
      9   git diff --staged --stat | awk '{ printf "#"; print}' | cat - "$1" | sponge "$1"
     10 fi