Handle gpg signing better (#1123)

Instead of checking whether it was set previously, setting it to false,
then setting it back to true if it was true before, just use the
command-line argument in git to override the config for that command.
Using a variable makes it pretty painless to do.
This commit is contained in:
Kyle Wood
2018-05-24 13:41:50 -05:00
parent efe156b1f7
commit fdc7459143
10 changed files with 87 additions and 102 deletions

11
paper
View File

@@ -23,6 +23,7 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
done
SOURCE=$([[ "$SOURCE" = /* ]] && echo "$SOURCE" || echo "$PWD/${SOURCE#./}")
basedir=$(dirname "$SOURCE")
gitcmd="git -c commit.gpgsign=false"
source "$basedir/scripts/functions.sh"
@@ -104,7 +105,7 @@ case "$1" in
set -e
paperstash
git rebase -i upstream/upstream
$gitcmd rebase -i upstream/upstream
paperunstash
)
;;
@@ -115,7 +116,7 @@ case "$1" in
set -e
paperstash
git rebase -i upstream/upstream
$gitcmd rebase -i upstream/upstream
paperunstash
)
;;
@@ -125,9 +126,9 @@ case "$1" in
(
set -e
git add .
git commit --amend
git rebase --continue
$gitcmd add .
$gitcmd commit --amend
$gitcmd rebase --continue
cd "$basedir"
scripts/rebuildPatches.sh "$basedir"