summaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:44 -0800
committerJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:44 -0800
commit62bef66fe783a6a49e4418b6ce194cc94017bc7c (patch)
treec25b0184452cd4bc65ccab75ae748391c6a9f7b5 /git-pull.sh
parentd8a1bac1d49dfe8879000e2bd07d138d3088f5b4 (diff)
parentea230d8b626d48a5b7851d84f75dd6708479cb59 (diff)
downloadgit-62bef66fe783a6a49e4418b6ce194cc94017bc7c.tar.gz
Merge branch 'bc/gpg-sign-everywhere'
Teach "--gpg-sign" option to many commands that create commits. * bc/gpg-sign-everywhere: pull: add the --gpg-sign option. rebase: add the --gpg-sign option rebase: parse options in stuck-long mode rebase: don't try to match -M option rebase: remove useless arguments check am: add the --gpg-sign option am: parse options in stuck-long mode git-sh-setup.sh: add variable to use the stuck-long mode cherry-pick, revert: add the --gpg-sign option
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-xgit-pull.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/git-pull.sh b/git-pull.sh
index def7cc0e23..6cd8ebc534 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -153,6 +153,15 @@ do
--no-verify-signatures)
verify_signatures=--no-verify-signatures
;;
+ --gpg-sign|-S)
+ gpg_sign_args=-S
+ ;;
+ --gpg-sign=*)
+ gpg_sign_args=$(git rev-parse --sq-quote "-S${1#--gpg-sign=}")
+ ;;
+ -S*)
+ gpg_sign_args=$(git rev-parse --sq-quote "$1")
+ ;;
--d|--dr|--dry|--dry-|--dry-r|--dry-ru|--dry-run)
dry_run=--dry-run
;;
@@ -320,11 +329,13 @@ merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
case "$rebase" in
true)
eval="git-rebase $diffstat $strategy_args $merge_args $rebase_args $verbosity"
+ eval="$eval $gpg_sign_args"
eval="$eval --onto $merge_head ${oldremoteref:-$merge_head}"
;;
*)
eval="git-merge $diffstat $no_commit $verify_signatures $edit $squash $no_ff $ff_only"
- eval="$eval $log_arg $strategy_args $merge_args $verbosity $progress"
+ eval="$eval $log_arg $strategy_args $merge_args $verbosity $progress"
+ eval="$eval $gpg_sign_args"
eval="$eval \"\$merge_name\" HEAD $merge_head"
;;
esac