summaryrefslogtreecommitdiff
path: root/lib/cli.zsh
diff options
context:
space:
mode:
authorMarc Cornellà <hello@mcornella.com>2022-04-14 12:13:53 +0200
committerMarc Cornellà <hello@mcornella.com>2022-04-14 12:14:40 +0200
commit30e23a643ba4f892c42e8d8d8a2ab31a6e68a9a6 (patch)
tree3a23120afd4e1886a2f5626e387650ffe828e6fc /lib/cli.zsh
parentf1a5fb5ee99f51f06a18b7b0ffecd8763f8d96d6 (diff)
downloadzsh-30e23a643ba4f892c42e8d8d8a2ab31a6e68a9a6.tar.gz
zsh-30e23a643ba4f892c42e8d8d8a2ab31a6e68a9a6.tar.bz2
zsh-30e23a643ba4f892c42e8d8d8a2ab31a6e68a9a6.zip
refactor(cli): fix `commit.gpgsign` test in `omz pr test`
Diffstat (limited to 'lib/cli.zsh')
-rw-r--r--lib/cli.zsh7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/cli.zsh b/lib/cli.zsh
index 56d5b91de..b71f6d9ce 100644
--- a/lib/cli.zsh
+++ b/lib/cli.zsh
@@ -573,14 +573,13 @@ function _omz::pr::test {
# Rebase pull request branch against the current master
_omz::log info "rebasing PR #$1..."
- local gpgsign
+ local ret gpgsign
{
# Back up commit.gpgsign setting: use --local to get the current repository
# setting, not the global one. If --local is not a known option, it will
# exit with a 129 status code.
- if ! gpgsign=$(command git config --local commit.gpgsign 2>/dev/null); then
- [[ $? -ne 129 ]] || gpgsign=$(command git config commit.gpgsign 2>/dev/null)
- fi
+ gpgsign=$(command git config --local commit.gpgsign 2>/dev/null) || ret=$?
+ [[ $ret -ne 129 ]] || gpgsign=$(command git config commit.gpgsign 2>/dev/null)
command git config commit.gpgsign false
command git rebase master ohmyzsh/pull-$1 || {