diff options
author | Nicolas Vigier <boklm@mars-attacks.org> | 2014-02-10 01:03:37 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-11 14:48:20 -0800 |
commit | 3ee5e54038fd32ee60b24ebd385981aeb14b80a5 (patch) | |
tree | bcd03b18bcef2a27653fe317cdeadf60c440e348 /git-rebase.sh | |
parent | b6e9e73e8af20c2301595d58087ad58a9df05725 (diff) | |
download | git-3ee5e54038fd32ee60b24ebd385981aeb14b80a5.tar.gz |
rebase: add the --gpg-sign option
Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-x | git-rebase.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/git-rebase.sh b/git-rebase.sh index 842d7d494a..5f6732bf3d 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -37,6 +37,7 @@ ignore-date! passed to 'git am' whitespace=! passed to 'git apply' ignore-whitespace! passed to 'git apply' C=! passed to 'git apply' +S,gpg-sign? GPG-sign commits Actions: continue! continue abort! abort and check out the original branch @@ -85,6 +86,7 @@ preserve_merges= autosquash= keep_empty= test "$(git config --bool rebase.autosquash)" = "true" && autosquash=t +gpg_sign_opt= read_basic_state () { test -f "$state_dir/head-name" && @@ -107,6 +109,8 @@ read_basic_state () { strategy_opts="$(cat "$state_dir"/strategy_opts)" test -f "$state_dir"/allow_rerere_autoupdate && allow_rerere_autoupdate="$(cat "$state_dir"/allow_rerere_autoupdate)" + test -f "$state_dir"/gpg_sign_opt && + gpg_sign_opt="$(cat "$state_dir"/gpg_sign_opt)" } write_basic_state () { @@ -120,6 +124,7 @@ write_basic_state () { "$state_dir"/strategy_opts test -n "$allow_rerere_autoupdate" && echo "$allow_rerere_autoupdate" > \ "$state_dir"/allow_rerere_autoupdate + test -n "$gpg_sign_opt" && echo "$gpg_sign_opt" > "$state_dir"/gpg_sign_opt } output () { @@ -324,6 +329,12 @@ do --rerere-autoupdate|--no-rerere-autoupdate) allow_rerere_autoupdate="$1" ;; + --gpg-sign) + gpg_sign_opt=-S + ;; + --gpg-sign=*) + gpg_sign_opt="-S${1#--gpg-sign=}" + ;; --) shift break |