]> git.wh0rd.org Git - home.git/commitdiff
add a force option (for kernel sync issues)
authorMike Frysinger <vapier@gentoo.org>
Wed, 13 Jul 2011 06:29:45 +0000 (02:29 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:38 +0000 (15:36 -0400)
.bin/git-format-request-pull

index b5df8fd83c3b56ea5d47d2f0bdfc420dff08e097..f03345b7143f331e7c4f569a10fb36b44c72bc7c 100755 (executable)
@@ -6,11 +6,13 @@ usage() {
 }
 
 auto=false
-eval set -- `getopt -- eh "$@"`
+force=false
+eval set -- `getopt -- efh "$@"`
 while [[ -n $1 ]] ; do
        case $1 in
                -h|--help) usage;;
                -e) auto=true;;
+               -f) force=true;;
                --) shift; break;;
                -*) usage 1;;
                *)  break;
@@ -34,7 +36,10 @@ fi
 name=$(git config --get user.name)
 email=$(git config --get user.email)
 tmp=$(mktemp)
-request=$(PAGER= git request-pull ${commit} ${url} ${branch}) || exit 1
+if ! request=$(PAGER= git request-pull ${commit} ${url} ${branch}) ; then
+       ${force} || exit 1
+       request=$(echo "${request}" | sed "s:..BRANCH.NOT.VERIFIED..:${branch}:")
+fi
 cat << EOF > ${tmp}
 From: ${name} <${email}>
 Date: $(date -R)