#!/bin/bash
NUMBER_OF_PATCHES=`docount`
NUMBER_OF_PATCHES_MINUS_TEN=`expr $NUMBER_OF_PATCHES - 10`
git format-patch -n --stdout HEAD~$NUMBER_OF_PATCHES..HEAD~$NUMBER_OF_PATCHES_MINUS_TEN | git imap-send