diff options
author | Alexander Hirsch <1zeeky@gmail.com> | 2016-05-20 23:00:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-20 15:01:00 -0700 |
commit | c57e501c51d6b76ce30658b94ee4a5dc6ac27f3e (patch) | |
tree | cfe6409170c891a61dea5fb5aa6cda87b69299f6 /builtin/pull.c | |
parent | 3916adf9978b020f9a9b165f4c1c109046899560 (diff) | |
download | git-c57e501c51d6b76ce30658b94ee4a5dc6ac27f3e.tar.gz |
pull: warn on --verify-signatures with --rebaseah/no-verify-signature-with-pull-rebase
git-pull silently ignores the --verify-signatures option when
running --rebase, potentially leaving users in the belief that
the rebase operation would check for valid GPG signatures.
Implementing --verify-signatures for git-rebase was talked about,
but doubts for a valid workflow rose up. Since you usually merge
other's branches into your branch you might have an interest that
their side has a valid GPG signature.
Rebasing, on the other hand, is to rebuild your branch on top of
other's work, in order to push the result back, and it is too late
to reject their work even if you find their commits lack acceptable
signature.
Let's warn users that the --verify-signatures option is ignored
during "pull --rebase"; users do not wonder what would happen if
their commits lack acceptable signature that way.
Signed-off-by: Alexander Hirsch <1zeeky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pull.c')
-rw-r--r-- | builtin/pull.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/pull.c b/builtin/pull.c index 1d7333c8a1..897a7f4e4e 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -815,6 +815,9 @@ static int run_rebase(const unsigned char *curr_head, argv_array_push(&args, "--no-autostash"); else if (opt_autostash == 1) argv_array_push(&args, "--autostash"); + if (opt_verify_signatures && + !strcmp(opt_verify_signatures, "--verify-signatures")) + warning(_("ignoring --verify-signatures for rebase")); argv_array_push(&args, "--onto"); argv_array_push(&args, sha1_to_hex(merge_head)); |