diff --git a/do-rebase b/do-rebase index da5ac9f..3926414 100755 --- a/do-rebase +++ b/do-rebase @@ -82,12 +82,9 @@ if [ $# -ge 1 ]; then usage 1 fi -if ! git remote show -n github >/dev/null 2>&1 ; then - git remote add \ - github git@github.com:vathpela/grub2-fedora.git >/dev/null 2>&1 - echo "Could not add remote: github" 1>&2 - exit 1 -fi +git remote add \ + github git@github.com:vathpela/grub2-fedora.git >/dev/null 2>&1 \ + || : git fetch github remote=$(git branch --list -r "github/${releasever}" 2>/dev/null) @@ -98,26 +95,17 @@ fi unset LC_ALL git rm -q 0*.patch -(cat < -Date: Wed Jul 22 10:18:00 2015 -0400 -Subject: Stop trying to "git format-patch" across a merge that confuses it - -EOF -git diff --full-index --binary refs/tags/grub-2.02-beta3..refs/remotes/github/master -) > grub-2.02-beta3-to-origin-master.patch - -patches=$(git format-patch refs/remotes/github/master..refs/remotes/github/${releasever}) -echo Patch0000: grub-2.02-beta3-to-origin-master.patch > grub.patches +patches=$(git format-patch grub-2.02-beta3..refs/remotes/github/${releasever}) +echo -n > grub.patches for x in $patches ; do echo Patch$(echo ${x} | cut -d- -f1): ${x} >> grub.patches done if [ -z "$amend" ]; then rpmdev-bumpspec -c "- Rebased to newer upstream for ${releasever}" grub2.spec fi -git add 0*.patch grub2.spec grub-2.02-beta3-to-origin-master.patch grub.patches +git add 0*.patch grub2.spec grub.patches if [ -z "$amend" ]; then fedpkg commit -s -c $amend else - git commit -m "" --amend + git commit --amend fi