[user] name = Ray Strode email = rstrode@redhat.com [alias] spec-apply = "!sh -e -c 'DIR=\"$(dirname $1)\"; FILE=\"$1\"; BRANCH=\"$(git describe --contains --all HEAD)\"; grep %patch \"$FILE\" | awk '\"'\"'{ print $1 \" \" $2 }'\"'\"' | sed '\"'\"'s/%p/P/'\"'\"' | while read command patchlevel; do grep $(echo $command:) \"$FILE\" | awk '\"'\"'{ print $2 }'\"'\"' | while read patch; do git checkout -b \"$BRANCH-$patch\"; git am -3 --ignore-whitespace $(echo -n $patchlevel | sed -n '\"'\"'s/foo/bar/p'\"'\"') \"$DIR/$patch\"; git checkout rhel6; git rebase \"$BRANCH-$patch\"; done ; done ' -"