File: check-notmuch-commit

package info (click to toggle)
notmuch 0.37-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,904 kB
  • sloc: sh: 21,010; ansic: 14,837; lisp: 8,673; cpp: 7,747; python: 6,164; perl: 355; makefile: 231; javascript: 34; ruby: 13
file content (31 lines) | stat: -rwxr-xr-x 552 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

# Usage suggestion:
#   git rebase -i --exec devel/check-notmuch-commit origin/master

set -e

quick=0
case "$1" in
    -q|-Q|--quick)
	quick=1
	;;
esac

if [ $quick = 0 ]; then
    make test
fi

unset uconf
for file in $(git diff --name-only --diff-filter=AM HEAD^); do
    case $file in
	*.c|*.h|*.cc|*.hh)
	    uncrustify --replace -c "${uconf=$(dirname "$0")/uncrustify.cfg}" "$file"
	    ;;
	*.el)
	    emacs -Q --batch "$file" --eval '(indent-region (point-min) (point-max) nil)' -f save-buffer
	    ;;
    esac
done

git diff --quiet