From: Junio C Hamano <gitster@pobox.com>
To: Alexander 'z33ky' Hirsch <1zeeky@gmail.com>
Cc: git@vger.kernel.org, "brian m. carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH v2] pull: make --rebase --verify-signatures illegal
Date: Thu, 28 Apr 2016 10:23:26 -0700 [thread overview]
Message-ID: <xmqqmvod641d.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160428134435.GA5901@netblarch> (Alexander Hirsch's message of "Thu, 28 Apr 2016 15:44:35 +0200")
Alexander 'z33ky' Hirsch <1zeeky@gmail.com> writes:
> Previously git-pull would silently ignore the --verify-signatures
> option.
I do not see a point of making it error out. Adding a warning about
the option being ignored might be a worthwhile thing to do (e.g. it
may solicit responses from those who have been depending on it not
erroring out, saying "these warnings are pointless and noisy--here
is my valid use case that ends up passing --rebase and --v-s at the
same time"), though.
> Signed-off-by: Alexander 'z33ky' Hirsch <1zeeky@gmail.com>
> ---
>
> I made the error-message conform to the CodingGuidelines (removed
> capitalization and full stop).
>
> Also, in the previous mail I said that I proposed a patch for git-pull
> last December, when I actually meant git-rebase.
>
> builtin/pull.c | 2 ++
> t/t5520-pull.sh | 14 ++++++++++++++
> 2 files changed, 16 insertions(+)
>
> diff --git a/builtin/pull.c b/builtin/pull.c
> index d98f481..b6e1507 100644
> --- a/builtin/pull.c
> +++ b/builtin/pull.c
> @@ -809,6 +809,8 @@ 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") == 0)
> + die(_("the --verify-signatures option does not work for --rebase"));
>
> argv_array_push(&args, "--onto");
> argv_array_push(&args, sha1_to_hex(merge_head));
> diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
> index 739c089..cb8f741 100755
> --- a/t/t5520-pull.sh
> +++ b/t/t5520-pull.sh
> @@ -341,6 +341,20 @@ test_expect_success 'branch.to-rebase.rebase should override pull.rebase' '
> test new = "$(git show HEAD:file2)"
> '
>
> +test_expect_success "pull --rebase --verify-signatures is illegal" '
> + git reset --hard before-rebase &&
> + test_must_fail git pull --rebase --verify-signatures . copy 2>err &&
> + test "$(git rev-parse HEAD)" = "$(git rev-parse before-rebase)" &&
> + test_i18ngrep "The --verify-signatures option does not work for --rebase." err
> +'
> +
> +test_expect_success "pull --rebase --no-verify-signatures" '
> + git reset --hard before-rebase &&
> + git pull --rebase --no-verify-signatures . copy &&
> + test "$(git rev-parse HEAD^)" = "$(git rev-parse copy)" &&
> + test new = "$(git show HEAD:file2)"
> +'
> +
> # add a feature branch, keep-merge, that is merged into master, so the
> # test can try preserving the merge commit (or not) with various
> # --rebase flags/pull.rebase settings.
next prev parent reply other threads:[~2016-04-28 17:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 9:52 [PATCH] pull: make --rebase --verify-signatures illegal Alexander 'z33ky' Hirsch
2016-04-28 13:44 ` [PATCH v2] " Alexander 'z33ky' Hirsch
2016-04-28 17:23 ` Junio C Hamano [this message]
2016-04-28 17:12 ` [PATCH] " Stefan Beller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqmvod641d.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=1zeeky@gmail.com \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).