Make do-rebase generate proper patches regardless of git config

The do-rebase script generate patches with git-format-patch, but the pkg
expects some non-default git configurations for the diffs and stats.

So instead requiring developers to setup these config options, pass them
to git-format-patch in do-rebase to generate the proper patches.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2018-05-11 16:33:02 +02:00 committed by Peter Jones
parent dc178ac546
commit bbce628672
1 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,9 @@ shopt -qs expand_aliases
export LC_COLLATE=C
export LC_ALL=C
format_patch_ops="--stat=80 --summary -O.git.diff.order --patience -l0"
alias othergit="GIT_DIR=$PWD/.rhboot.git GIT_WORK_TREE=$PWD git"
alias formatpatch="othergit format-patch $format_patch_ops"
usage()
{
@ -119,7 +121,7 @@ unset LC_ALL
git rm -q 0*.patch
> grub.patches
patches=$(othergit format-patch grub-2.02..refs/remotes/rhboot/${releasever})
patches=$(formatpatch grub-2.02..refs/remotes/rhboot/${releasever})
for x in $patches ; do
echo Patch$(echo ${x} | cut -d- -f1): ${x} >> grub.patches
done