diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-13 13:18:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-13 13:18:27 -0700 |
commit | 50b26f561298c58029d408f4b0c5bca20b7806a3 (patch) | |
tree | 9a5440e459fc8e88c75cf633c8150bd6c47704b1 /git-rebase.sh | |
parent | 17130a704620c0e5455ef0f362f8d0f40758d1ea (diff) | |
parent | 6694856153f85cb552cc92d75ddeabf5bdec4f20 (diff) | |
download | git-50b26f561298c58029d408f4b0c5bca20b7806a3.tar.gz |
Merge branch 'jc/commit-tree-ignore-commit-gpgsign'
"git commit-tree" plumbing command required the user to always sign
its result when the user sets the commit.gpgsign configuration
variable, which was an ancient mistake. Rework "git rebase" that
relied on this mistake so that it reads commit.gpgsign and pass (or
not pass) the -S option to "git commit-tree" to keep the end-user
expectation the same, while teaching "git commit-tree" to ignore
the configuration variable. This will stop requiring the users to
sign commit objects used internally as an implementation detail of
"git stash".
* jc/commit-tree-ignore-commit-gpgsign:
commit-tree: do not pay attention to commit.gpgsign
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-x | git-rebase.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-rebase.sh b/git-rebase.sh index 0bf41ee72b..44ede367ae 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -87,7 +87,10 @@ preserve_merges= autosquash= keep_empty= test "$(git config --bool rebase.autosquash)" = "true" && autosquash=t -gpg_sign_opt= +case "$(git config --bool commit.gpgsign)" in +true) gpg_sign_opt=-S ;; +*) gpg_sign_opt= ;; +esac read_basic_state () { test -f "$state_dir/head-name" && |