#!/bin/bash
cat $1 | sed 's/[ \t]*$//' | git apply -
for NAME in `find . -name \*.c`; do
   git add $NAME > /dev/null 2>&1
done
for NAME in `find . -name \*.h`; do
   git add $NAME > /dev/null 2>&1
done
MESSAGE=`grep Subject $1 | sed "s/Subject: //"`
git commit -a -n -m "$MESSAGE"
