From patchwork Fri Apr 3 10:28:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11472505 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 437DA17EA for ; Fri, 3 Apr 2020 10:28:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2190F2073B for ; Fri, 3 Apr 2020 10:28:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pYKBRpdx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390504AbgDCK2f (ORCPT ); Fri, 3 Apr 2020 06:28:35 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:34384 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727774AbgDCK2f (ORCPT ); Fri, 3 Apr 2020 06:28:35 -0400 Received: by mail-pf1-f195.google.com with SMTP id v23so385089pfm.1 for ; Fri, 03 Apr 2020 03:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JnFTjtfieg1I1m3De+/JhaHJBf3ebLw/Fn4BrFMog6s=; b=pYKBRpdxgZCdmFr76YnS/KEyFHVaF9hUbfzJXZn6sCSIzI6A9bc//Bg4Z31qaw7Y5Y oGsDyHuhE+b3at0c76mBguOlDEuCzn6ck8MaH+1KuMu7KwRuCNuPNAMKa0NRhdOG/wyk fZfiEhmQ74Ny1hzJBXSQJ0XvsQUM4g0ZQIe6VTO1JsAxQHgZBQs+saBREeNKvndBzpMn JsFflTnWlZEkVPRI/9GgRbWEUDYg227bB2n1zTuhAaRrVIhADF6y1j2lt3vvkh/an9kd i2+narDkUlSZx4raL8kBkyCI0aFAGTldBlaLwsUrJ0bay/R4ei/dGN/7jzn/bMeojA4/ TrnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JnFTjtfieg1I1m3De+/JhaHJBf3ebLw/Fn4BrFMog6s=; b=KSyDYsVR6s0sLNyCgr+ViDENpRoRklJeEF6M1jrz5M4cF0pLTzDCGhRMiryixlT/sE W92NeaRoaVtb0Fn06mlqqQnWE4ZP8TOPhz6hLiFZV2pXztqLfMQThruihU7IvGVR+HAI AZz9xmGC5SPN3N1Dp3Gq/CaOrXHsVfqYzQbi3wgRfc8u7WFMgGa93Tt2RRiCuo8B+13L cVET8jDaBTZ93E+Jss6/CWnEODAt+gd5jJ5SZBYopK/ECc0kFWvc70Sbd2ZRu8R3cFyq 6d+wb2tJ12LNUWPySch6k4QVHyP5U4XtqUMbnxKhEawW6AEodLPcdKJ7yuN3yuovGL85 CCxw== X-Gm-Message-State: AGi0PuaE/tOvlIgB76bler3KIs52psbgO5+zNveyXnTJWaWyGF1QpNxt dH3olU8BMMGxO6V3tCzhio+TuxZQ X-Google-Smtp-Source: APiQypKauJwlC+18R4a9ly06p8PhsxLBTWrBrk5fQL4Ihws0f+LIYX3n0GBz+IHZIru/XKlt6k14sw== X-Received: by 2002:a63:2989:: with SMTP id p131mr7650944pgp.281.1585909714036; Fri, 03 Apr 2020 03:28:34 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id c21sm4958126pgn.84.2020.04.03.03.28.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Apr 2020 03:28:33 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 1/6] rebase.c: honour --no-gpg-sign Date: Fri, 3 Apr 2020 17:28:02 +0700 Message-Id: X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: <20200331064456.GA15850@danh.dev> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Đoàn Trần Công Danh --- Documentation/git-rebase.txt | 5 ++- builtin/rebase.c | 7 ++-- t/t3435-rebase-gpg-sign.sh | 71 ++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 4 deletions(-) create mode 100755 t/t3435-rebase-gpg-sign.sh diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index f7a6033607..19e280f93f 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -354,9 +354,12 @@ See also INCOMPATIBLE OPTIONS below. -S[]:: --gpg-sign[=]:: +--no-gpg-sign:: GPG-sign commits. The `keyid` argument is optional and defaults to the committer identity; if specified, it must be - stuck to the option without a space. + stuck to the option without a space. `--no-gpg-sign` is useful to + countermand both `commit.gpgSign` configuration variable, and + earlier `--gpg-sign`. -q:: --quiet:: diff --git a/builtin/rebase.c b/builtin/rebase.c index 27a07d4e78..7e2ad66e9e 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -1593,6 +1593,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) options.allow_empty_message = 1; git_config(rebase_config, &options); + /* options.gpg_sign_opt will be either "-S" or NULL */ + gpg_sign = options.gpg_sign_opt ? "" : NULL; + FREE_AND_NULL(options.gpg_sign_opt); if (options.use_legacy_rebase || !git_env_bool("GIT_TEST_REBASE_USE_BUILTIN", -1)) @@ -1823,10 +1826,8 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) if (options.empty != EMPTY_UNSPECIFIED) imply_merge(&options, "--empty"); - if (gpg_sign) { - free(options.gpg_sign_opt); + if (gpg_sign) options.gpg_sign_opt = xstrfmt("-S%s", gpg_sign); - } if (exec.nr) { int i; diff --git a/t/t3435-rebase-gpg-sign.sh b/t/t3435-rebase-gpg-sign.sh new file mode 100755 index 0000000000..b47c59c190 --- /dev/null +++ b/t/t3435-rebase-gpg-sign.sh @@ -0,0 +1,71 @@ +#!/bin/sh +# +# Copyright (c) 2020 Doan Tran Cong Danh +# + +test_description='test rebase --[no-]gpg-sign' + +. ./test-lib.sh +. "$TEST_DIRECTORY/lib-rebase.sh" +. "$TEST_DIRECTORY/lib-gpg.sh" + +if ! test_have_prereq GPG +then + skip_all='skip all test rebase --[no-]gpg-sign, gpg not available' + test_done +fi + +test_rebase_gpg_sign () { + local must_fail= will=will fake_editor= + if test "x$1" = "x!" + then + must_fail=test_must_fail + will="won't" + shift + fi + conf=$1 + shift + test_expect_success "rebase $* with commit.gpgsign=$conf $will sign commit" " + git reset two && + git config commit.gpgsign $conf && + set_fake_editor && + FAKE_LINES='r 1 p 2' git rebase --force-rebase --root $* && + $must_fail git verify-commit HEAD^ && + $must_fail git verify-commit HEAD + " +} + +test_expect_success 'setup' ' + test_commit one && + test_commit two && + test_must_fail git verify-commit HEAD && + test_must_fail git verify-commit HEAD^ +' + +test_expect_success 'setup: merge commit' ' + test_commit fork-point && + git switch -c side && + test_commit three && + git switch master && + git merge --no-ff side && + git tag merged +' + +test_rebase_gpg_sign ! false +test_rebase_gpg_sign true +test_rebase_gpg_sign ! true --no-gpg-sign +test_rebase_gpg_sign ! true --gpg-sign --no-gpg-sign +test_rebase_gpg_sign false --no-gpg-sign --gpg-sign +test_rebase_gpg_sign true -i +test_rebase_gpg_sign ! true -i --no-gpg-sign +test_rebase_gpg_sign ! true -i --gpg-sign --no-gpg-sign +test_rebase_gpg_sign false -i --no-gpg-sign --gpg-sign + +test_expect_failure 'rebase -p --no-gpg-sign override commit.gpgsign' ' + git reset --hard merged && + git config commit.gpgsign true && + git rebase -p --no-gpg-sign --onto=one fork-point master && + test_must_fail git verify-commit HEAD +' + +test_done From patchwork Fri Apr 3 10:28:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11472507 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 913EA17EA for ; Fri, 3 Apr 2020 10:28:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 653E12073B for ; Fri, 3 Apr 2020 10:28:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FKAVCaAI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390541AbgDCK2h (ORCPT ); Fri, 3 Apr 2020 06:28:37 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42594 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727774AbgDCK2g (ORCPT ); Fri, 3 Apr 2020 06:28:36 -0400 Received: by mail-pf1-f193.google.com with SMTP id 22so3272137pfa.9 for ; Fri, 03 Apr 2020 03:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TfiCFBcEscmFgaoXbzjzBdCQMTmRszXm0lpXzuORUks=; b=FKAVCaAIA2xsxCtWaVUfKg1sH2Q412uUqAz3j6/nM0eJWOvTNoQWw2KIRPtMsbOPT2 XFphZ1Np//tbONY+L49IaICj5/3HLM7wXRnzRMawHn0FucuoP10vWKHk1hEnjen+FziN 3dU9OgDHZe7gReAHcNpCU048Nt5/715KURhhwyvRHlWUBTZ31dwZYv4AicwRpJ0iYpiR jTpogOgWasg+9MqA+21JyCrTzTkowI1TVfUahaRdmNoxlLd3kL66EzqJMBp2meD0ZMVV 6Rm2U0nURibmqaIK+VHv/mXxpFROVR2lniypIhX7g7UshAlCesHUB4vfMb9p2GxO1e44 CSGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TfiCFBcEscmFgaoXbzjzBdCQMTmRszXm0lpXzuORUks=; b=VBAETOZtpwA/7yWE9Jx55O79QmwFEEBAkNEok/eEKLgKNWCKiqOuDkgyCHu/b0NLr+ KOtUPfhxX/ZoQgeqW7+K7l/0UrJi50ko/I+a2WpNpm+XeIxtovKC1ara8hcv+vQVQEDg rsHahN2lT/62BxBsG4jAjHBtahbVLxwDc+YjcycUBzmHRuQmP1C1OAA6IBeGm9gGDxCA MkeRJEQsGhKR7oqWf5OeMIw7vrSoWwq+IQqef9IxKdCPfbYRqlOx1NJAXsuX4znbhsJM A1tXfuWsd6QtilyTR7ml5PAClBvvGYlQhbdq1g44e1KAnWP8aeJQ+99dUVflkiDdZwY8 AVuA== X-Gm-Message-State: AGi0PuY9lcCjMwQLxx9KGCb1KMkHcXVkocUwvRam2pha9HMZGnZ4XFk1 wnN97Snyp4c4bx3qZUkJjXjvL3yC X-Google-Smtp-Source: APiQypLL8akxQSqUp243IH1FQwjZaTkpyYKvw7b27X/djkIYCY0GbqMeo/pSbdnw2d+Fs6BghGqvjA== X-Received: by 2002:a63:7c16:: with SMTP id x22mr7489008pgc.172.1585909715500; Fri, 03 Apr 2020 03:28:35 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id c21sm4958126pgn.84.2020.04.03.03.28.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Apr 2020 03:28:35 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 2/6] cherry-pick/revert: honour --no-gpg-sign in all case Date: Fri, 3 Apr 2020 17:28:03 +0700 Message-Id: <28ebbfe72a04b787fb92702199efea663a6b7ee5.1585909453.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: <20200331064456.GA15850@danh.dev> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org {cherry-pick,revert} --edit hasn't honoured --no-gpg-sign yet. Pass this option down to git-commit to honour it. Signed-off-by: Đoàn Trần Công Danh --- Documentation/git-cherry-pick.txt | 5 +- Documentation/git-revert.txt | 5 +- sequencer.c | 2 + t/t3514-cherry-pick-revert-gpg.sh | 86 +++++++++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 2 deletions(-) create mode 100755 t/t3514-cherry-pick-revert-gpg.sh diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 83ce51aedf..75feeef08a 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -109,9 +109,12 @@ effect to your index in a row. -S[]:: --gpg-sign[=]:: +--no-gpg-sign:: GPG-sign commits. The `keyid` argument is optional and defaults to the committer identity; if specified, it must be - stuck to the option without a space. + stuck to the option without a space. `--no-gpg-sign` is useful to + countermand both `commit.gpgSign` configuration variable, and + earlier `--gpg-sign`. --ff:: If the current HEAD is the same as the parent of the diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt index 9d22270757..044276e9da 100644 --- a/Documentation/git-revert.txt +++ b/Documentation/git-revert.txt @@ -90,9 +90,12 @@ effect to your index in a row. -S[]:: --gpg-sign[=]:: +--no-gpg-sign:: GPG-sign commits. The `keyid` argument is optional and defaults to the committer identity; if specified, it must be - stuck to the option without a space. + stuck to the option without a space. `--no-gpg-sign` is useful to + countermand both `commit.gpgSign` configuration variable, and + earlier `--gpg-sign`. -s:: --signoff:: diff --git a/sequencer.c b/sequencer.c index 6fd2674632..9969355de7 100644 --- a/sequencer.c +++ b/sequencer.c @@ -946,6 +946,8 @@ static int run_git_commit(struct repository *r, argv_array_push(&cmd.args, "--amend"); if (opts->gpg_sign) argv_array_pushf(&cmd.args, "-S%s", opts->gpg_sign); + else + argv_array_push(&cmd.args, "--no-gpg-sign"); if (defmsg) argv_array_pushl(&cmd.args, "-F", defmsg, NULL); else if (!(flags & EDIT_MSG)) diff --git a/t/t3514-cherry-pick-revert-gpg.sh b/t/t3514-cherry-pick-revert-gpg.sh new file mode 100755 index 0000000000..5b2e250eaa --- /dev/null +++ b/t/t3514-cherry-pick-revert-gpg.sh @@ -0,0 +1,86 @@ +#!/bin/sh +# +# Copyright (c) 2020 Doan Tran Cong Danh +# + +test_description='test {cherry-pick,revert} --[no-]gpg-sign' + +. ./test-lib.sh +. "$TEST_DIRECTORY/lib-gpg.sh" + +if ! test_have_prereq GPG +then + skip_all='skip all test {cherry-pick,revert} --[no-]gpg-sign, gpg not available' + test_done +fi + +test_gpg_sign () { + local must_fail= will=will fake_editor= + if test "x$1" = "x!" + then + must_fail=test_must_fail + will="won't" + shift + fi + conf=$1 + cmd=$2 + cmit=$3 + shift 3 + test_expect_success "$cmd $* $cmit with commit.gpgsign=$conf $will sign commit" " + git reset --hard tip && + git config commit.gpgsign $conf && + git $cmd $* $cmit && + git rev-list tip.. >rev-list && + $must_fail git verify-commit \$(cat rev-list) + " +} + +test_expect_success 'setup' ' + test_commit one && + git switch -c side && + test_commit side1 && + test_commit side2 && + git switch - && + test_commit two && + test_commit three && + test_commit tip +' + +test_gpg_sign ! false cherry-pick side +test_gpg_sign ! false cherry-pick ..side +test_gpg_sign true cherry-pick side +test_gpg_sign true cherry-pick ..side +test_gpg_sign ! true cherry-pick side --no-gpg-sign +test_gpg_sign ! true cherry-pick ..side --no-gpg-sign +test_gpg_sign ! true cherry-pick side --gpg-sign --no-gpg-sign +test_gpg_sign ! true cherry-pick ..side --gpg-sign --no-gpg-sign +test_gpg_sign false cherry-pick side --no-gpg-sign --gpg-sign +test_gpg_sign false cherry-pick ..side --no-gpg-sign --gpg-sign +test_gpg_sign true cherry-pick side --edit +test_gpg_sign true cherry-pick ..side --edit +test_gpg_sign ! true cherry-pick side --edit --no-gpg-sign +test_gpg_sign ! true cherry-pick ..side --edit --no-gpg-sign +test_gpg_sign ! true cherry-pick side --edit --gpg-sign --no-gpg-sign +test_gpg_sign ! true cherry-pick ..side --edit --gpg-sign --no-gpg-sign +test_gpg_sign false cherry-pick side --edit --no-gpg-sign --gpg-sign +test_gpg_sign false cherry-pick ..side --edit --no-gpg-sign --gpg-sign + +test_gpg_sign ! false revert HEAD --edit +test_gpg_sign ! false revert two.. --edit +test_gpg_sign true revert HEAD --edit +test_gpg_sign true revert two.. --edit +test_gpg_sign ! true revert HEAD --edit --no-gpg-sign +test_gpg_sign ! true revert two.. --edit --no-gpg-sign +test_gpg_sign ! true revert HEAD --edit --gpg-sign --no-gpg-sign +test_gpg_sign ! true revert two.. --edit --gpg-sign --no-gpg-sign +test_gpg_sign false revert HEAD --edit --no-gpg-sign --gpg-sign +test_gpg_sign false revert two.. --edit --no-gpg-sign --gpg-sign +test_gpg_sign true revert HEAD --no-edit +test_gpg_sign true revert two.. --no-edit +test_gpg_sign ! true revert HEAD --no-edit --no-gpg-sign +test_gpg_sign ! true revert two.. --no-edit --no-gpg-sign +test_gpg_sign ! true revert HEAD --no-edit --gpg-sign --no-gpg-sign +test_gpg_sign ! true revert two.. --no-edit --gpg-sign --no-gpg-sign +test_gpg_sign false revert HEAD --no-edit --no-gpg-sign --gpg-sign + +test_done From patchwork Fri Apr 3 10:28:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11472509 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1A2D217EA for ; Fri, 3 Apr 2020 10:28:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EC5722080C for ; Fri, 3 Apr 2020 10:28:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NsPDG2ZX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390577AbgDCK2i (ORCPT ); Fri, 3 Apr 2020 06:28:38 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:42216 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727774AbgDCK2i (ORCPT ); Fri, 3 Apr 2020 06:28:38 -0400 Received: by mail-pl1-f195.google.com with SMTP id e1so2536582plt.9 for ; Fri, 03 Apr 2020 03:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ONtu0eJ4Cx3U0vY50kjQSwSUjXpng4JZjD4zZdgCI1M=; b=NsPDG2ZXIXZm8tWob7vJ8VKdOm3oLhg/f3Ha7z3pWHRhnMqEE9CnaSBSjje0txF3zh deJm6TvN3O80VmetPOKQDnGce8HgOjLzexVL1YoZEyyS4FkevYXfpqUaqurtYxbm+WsV gKF6vK8SLBUvT3xfTHvpAHie4EdaXHYESd/N1QW5RIsJerZVT9iCs6j4kD3EBW9qB6zO /XVRC2mrdKLWa0n6e3v1VrvDNld5Yj5TKTzP6t/C1oaq4/OqY8lVCCnUxkugSlwkG28u /Ftaliv2RutE9TbIOSrklFVSxtncjqeBYJQa+3Q0oJ+neKAs3tGQ2fRwUKeGQOzv5MQr 46mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ONtu0eJ4Cx3U0vY50kjQSwSUjXpng4JZjD4zZdgCI1M=; b=PPlNmEyPv2ATnAR9lARRJmpXjzASbmVQ6qQbCzDpfazenhTHiF5BfFHO0k1R76uVBg FerZ1ZZr6S/V/a/tt/uLHkv5tf55N/D3jrhz3l2SZUcMp8yFfmlAGrkXaUSuHBsYhjCt /QJDHEmKcLkUHF8+1/fZy1eZOp/5ztLagIA8OS9BurOQn63t+OcIrDHbBkhF98WFgmsU sMCCw1uyOtCliOWMMmCwZEggevUydaYxKVfHoIW4dusAgJnY6UbVBwqg6r8/gjuwxtFi CjBJwZU+zOiswAXDa/nc4D1ydcp1v0Ow+cuEXFnu/dRRwo8H1+Gi0cfANUWA9OZsqziR lETA== X-Gm-Message-State: AGi0PubKkp0mIcKpp2dbybrqM9DeC/JX/iW77vaH1uBDJS4vfXTeJpL4 O4cwIUV3Q2B37DbO78yxOLABTkL6 X-Google-Smtp-Source: APiQypII7EmsU8b/6ReIDqJa/aRCe9IIjK7WnDt4PGz9xrG3qnlNER1flen1ubBVfdF14d70Z0wjWQ== X-Received: by 2002:a17:90a:10c1:: with SMTP id b1mr9131239pje.142.1585909716960; Fri, 03 Apr 2020 03:28:36 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id c21sm4958126pgn.84.2020.04.03.03.28.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Apr 2020 03:28:36 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 3/6] Documentation: document am --no-gpg-sign Date: Fri, 3 Apr 2020 17:28:04 +0700 Message-Id: <340374fb68e6b442c2ab4ceb50c49ae0471fd240.1585909453.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: <20200331064456.GA15850@danh.dev> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Đoàn Trần Công Danh --- Documentation/git-am.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index ab5754e05d..38c0852139 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -148,9 +148,12 @@ default. You can use `--no-utf8` to override this. -S[]:: --gpg-sign[=]:: +--no-gpg-sign:: GPG-sign commits. The `keyid` argument is optional and defaults to the committer identity; if specified, it must be - stuck to the option without a space. + stuck to the option without a space. `--no-gpg-sign` is useful to + countermand both `commit.gpgSign` configuration variable, and + earlier `--gpg-sign`. --continue:: -r:: From patchwork Fri Apr 3 10:28:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11472513 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE17817EA for ; Fri, 3 Apr 2020 10:28:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD06520787 for ; Fri, 3 Apr 2020 10:28:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jz+BflgR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390615AbgDCK2m (ORCPT ); Fri, 3 Apr 2020 06:28:42 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:33124 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390580AbgDCK2j (ORCPT ); Fri, 3 Apr 2020 06:28:39 -0400 Received: by mail-pl1-f194.google.com with SMTP id ay1so2554219plb.0 for ; Fri, 03 Apr 2020 03:28:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2VJ+ghKNYZisJ+c88OB5GwMi51ao6YznAWZMEpkchz0=; b=Jz+BflgRcTYiB+fZXNLgJltT6WKpooc0ZbeC08T0UyMfLbiIZ7riI5yDNn9EPdgnwQ ZRbThzhFQzeSYfCPH8TJGIbiXCJ9FFV67PqcRnC3akkW7Nh0yRqh/VZ/+pkXwT+7TeeT qqtIlkE/h/cn+wOk5o+kmPCwcxh9GAMWLKGKVS6+NhxKeyMoDzTRfbStxcZ1X24ngHXV GFb96umJtaA3rbYwxVNKTWY0bKH/o21/cMUP89iuppcHfUfoB9DTpvc2bUrJo/MdeFa8 fOjW5PJEssaiFX0TUp9Zbip4TCUwMrtH/0KIlit3x0JmoVGHuOyuMB5xyi2ro4nvvbqn tp9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2VJ+ghKNYZisJ+c88OB5GwMi51ao6YznAWZMEpkchz0=; b=Qo6pqpPw15wYn5R42sus1hfzp9FZrxjHPBkyb05DERoeN909FVJIz7SMIXn2EWzlIH 8BFan1rKVk50l6cpGLrn2g+OO0DdHqS/vr5iddJpRKMAB7VYI8ouYLItKOYQBH/SeXVH vJz5AttPQFGEQhvcNsRz78HENlNhNpghYfw/f+oBlyfbap/XiHeR9BrtNs5NX53GBLIB 9aBvEQiBO47QR7gyhtW8Rhx5soahh4D9S5TdqDiZzVvSNxXHTBoctN+o3xE7Ui6eb0Hp 87+jt35woPPCytxd9eDpVHf/W/YgP1UexLJe5or8QDHd2nC2jEZOhCEYoMde+s7CMQ+y lXSw== X-Gm-Message-State: AGi0PualyqdHJgboqbmQI2aqVHxwkZpOQTEXLlitKub6EC1C+dsj9gHw 3TjMA7EpC2lPTKGpEtkDEG4IzAky X-Google-Smtp-Source: APiQypJAgDKjlCl/qIo67vTdFb71o3qoZo4+G4qxgNSClTJC7hCMbVCMw6OkaCARxCzyLI+BH4EUXg== X-Received: by 2002:a17:902:5989:: with SMTP id p9mr7296006pli.279.1585909718516; Fri, 03 Apr 2020 03:28:38 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id c21sm4958126pgn.84.2020.04.03.03.28.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Apr 2020 03:28:38 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 4/6] Documentation: reword commit --no-gpg-sign Date: Fri, 3 Apr 2020 17:28:05 +0700 Message-Id: <1b952f7348c285ef50594a3b29907daee56ed2cc.1585909453.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: <20200331064456.GA15850@danh.dev> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Merge with --gpg-sign option, and clarify that --no-gpg-sign also override earlier --gpg-sign. Signed-off-by: Đoàn Trần Công Danh --- Documentation/git-commit.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 13f653989f..a3baea32ae 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -348,13 +348,12 @@ changes to tracked files. -S[]:: --gpg-sign[=]:: +--no-gpg-sign:: GPG-sign commits. The `keyid` argument is optional and defaults to the committer identity; if specified, it must be - stuck to the option without a space. - ---no-gpg-sign:: - Countermand `commit.gpgSign` configuration variable that is - set to force each and every commit to be signed. + stuck to the option without a space. `--no-gpg-sign` is useful to + countermand both `commit.gpgSign` configuration variable, and + earlier `--gpg-sign`. \--:: Do not interpret any more arguments as options. From patchwork Fri Apr 3 10:28:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11472515 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 17B1817EA for ; Fri, 3 Apr 2020 10:28:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E98C620787 for ; Fri, 3 Apr 2020 10:28:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ju94PuxW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390612AbgDCK2l (ORCPT ); Fri, 3 Apr 2020 06:28:41 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:52315 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727774AbgDCK2l (ORCPT ); Fri, 3 Apr 2020 06:28:41 -0400 Received: by mail-pj1-f65.google.com with SMTP id ng8so2811619pjb.2 for ; Fri, 03 Apr 2020 03:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p7WgMkvwrxf20l0c/uKCm6S3ymQE2OFAOzsR/7Mu7x0=; b=Ju94PuxWbZci2vFpYFXRmnFfjtGEbLvn31tZBUvnWzyRhN10X8NegXJvbXuFsqjj/w CcowXjC2njhHM1SfLrytRSirkJO+eRhjUp4iK5Df61jJtCfPJNAG1gEvClZa58qwRcG7 hRkdyK7Maz40/pBV4Q+E6UDMire4qtx7mNJwAbEBzyjxQFqk324A/pRci7svS+KiAuR9 /A8UtG4jlFfRt120IrfIinjDvCP8RpYRsa8NVNj8Rj2YrUFABDUG7Lr3R2qJiLwYAfVb e1ms9gdhFmQKzrWU8r3Jq7yGK/xKg4i59SFkIIxzX3nonTGgIF8sMZ29/EMWfpK63phS 9zKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p7WgMkvwrxf20l0c/uKCm6S3ymQE2OFAOzsR/7Mu7x0=; b=cV3Y7HWFV9GwXX3kMqysuPAqCgrAfWbHTG31jBmDHUB80LMaPNR0jOG8OzuM3fsw71 6rFdL8yl8lAfCInGgPM/qgcHYMpYc7x4HEgeCT0AA4aussJF/T0L24dmj6kCMllQsLH5 RomX4sj144No5tTkkw+yuQmVplSftC+jO389AT2W/FisLmNTfXCBoTw3xrgITG41wh2e WpjIo4glVoOqutYGGolUTJboZAm0y3IBOM/HglQe1E7rZ11UeBetiwqpNJAWyODTHAXi yDLGmrrDsEAQL1mj85rT/7PC0zulXvRxvGzgh9jvy93HgGBYbQHPLVsJWzwELfJl2suU weew== X-Gm-Message-State: AGi0PuYRY9BZ6HYdmswY/jmKRUthz8NqsUWv+RFHznzVonZX84yK6NHZ vzO0qmlbvlNCvYzI2ShPD8z9IPCa X-Google-Smtp-Source: APiQypLhSMOokWXpPNnyD9vKnst7t6L1lc6hC7GUW5nqCh3jWfdlgUiNtpu1E1VV6oX2t7wc7fj+CQ== X-Received: by 2002:a17:90b:34e:: with SMTP id fh14mr8847611pjb.76.1585909719987; Fri, 03 Apr 2020 03:28:39 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id c21sm4958126pgn.84.2020.04.03.03.28.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Apr 2020 03:28:39 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 5/6] Documentation: merge commit-tree --[no-]gpg-sign Date: Fri, 3 Apr 2020 17:28:06 +0700 Message-Id: <685832b06965225fa2a7cefd5955cacdfb44d5fe.1585909453.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: <20200331064456.GA15850@danh.dev> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Đoàn Trần Công Danh --- Documentation/git-commit-tree.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt index ec15ee8d6f..2e2c581098 100644 --- a/Documentation/git-commit-tree.txt +++ b/Documentation/git-commit-tree.txt @@ -61,13 +61,11 @@ OPTIONS -S[]:: --gpg-sign[=]:: +--no-gpg-sign:: GPG-sign commits. The `keyid` argument is optional and defaults to the committer identity; if specified, it must be - stuck to the option without a space. - ---no-gpg-sign:: - Do not GPG-sign commit, to countermand a `--gpg-sign` option - given earlier on the command line. + stuck to the option without a space. `--no-gpg-sign` is useful to + countermand a `--gpg-sign` option given earlier on the command line. Commit Information ------------------ From patchwork Fri Apr 3 10:28:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11472517 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7084F81 for ; Fri, 3 Apr 2020 10:28:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4FDFF2080C for ; Fri, 3 Apr 2020 10:28:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i9S5aD7L" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390627AbgDCK2p (ORCPT ); Fri, 3 Apr 2020 06:28:45 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:35740 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390580AbgDCK2m (ORCPT ); Fri, 3 Apr 2020 06:28:42 -0400 Received: by mail-pl1-f193.google.com with SMTP id c12so2549933plz.2 for ; Fri, 03 Apr 2020 03:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kf3JSs8Fgl7Az6Mg3L9eHU85CNRXBMCrJPxrQHjQgws=; b=i9S5aD7LHppV+FhEZyw+3GdKciH9QBiHTz784SmpbBKGUxP9rgtJQNdGUP0iYO3N85 lWg7a+PSiaRv4S4OS/kbCyBMWVtoKCKqVamOAoJo96MsmcEV3Ul4jilAIPqDxJhFpdgj nLdak2A8j8Q8VUe3qvyZz4oiPZok7LSNqcEnjwkcukYTFKrnsJptBSiivj5nUb47vueR Bhv5V+roQ2isIUl9nn6PyU1jmSrUQVXTPTcvyW+vxoRBF4E/aCajyZlTAfFypyLHyOia TWGDuQUjLJ60NRT9vYqOuGPwhUhHhBC5HOWIn/ky5Hz4N0J6R1K9akU2Wq0HusMZynHU ZegA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kf3JSs8Fgl7Az6Mg3L9eHU85CNRXBMCrJPxrQHjQgws=; b=YuQ8qIcKTblzWGHM9HGpHszJZ9nkMpFGzatRwE543YkW79C9RsdmTMXitVUPWbFQd3 6pdJ6LHr/wStI5ltglfxzDBlJ32WgBi8673fIy1uELwNZCwtp4Ubv9DeDmyEw74mussI 1gCQV5fWQ2XUvv13V6ZFsjLqOgX5zDd3cV+LFWm9G7VKc5dG+QCKmr0HBT8Zrcx4t2jp W2QEAW7Aa8J/ZwquQVymJg28d9WyVvrA2aOL1wKU0JOkJZ0f0YSC/9+GVEyNChj0JXsc bEILdz7NY8TC265NeffJkXn1c2u5OFwrrAOFN5fj6e3kdkSMfsDZ78Um9XfgwQgJztJ/ 097w== X-Gm-Message-State: AGi0PuZ5eOF/0fiN3Bl9QHRVkn0AP0BNZW10sd2Aez0j0RJvwsvNR4eB P2IPkqCuftXvoF5bF+u6vQreC2c6 X-Google-Smtp-Source: APiQypIMFu0FXu3dA1DBYKqS1ybMgpgo9UW1npfM/gkOHJF+GkJysIe+OrPpLwMgYznDGLtq7+Xy+w== X-Received: by 2002:a17:902:9348:: with SMTP id g8mr7332001plp.112.1585909721525; Fri, 03 Apr 2020 03:28:41 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id c21sm4958126pgn.84.2020.04.03.03.28.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Apr 2020 03:28:41 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 6/6] Documentation: document merge option --no-gpg-sign Date: Fri, 3 Apr 2020 17:28:07 +0700 Message-Id: X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: <20200331064456.GA15850@danh.dev> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Đoàn Trần Công Danh --- Documentation/merge-options.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt index 40dc4f5e8c..fb3a6e8d42 100644 --- a/Documentation/merge-options.txt +++ b/Documentation/merge-options.txt @@ -61,9 +61,12 @@ When not possible, refuse to merge and exit with a non-zero status. -S[]:: --gpg-sign[=]:: +--no-gpg-sign:: GPG-sign the resulting merge commit. The `keyid` argument is optional and defaults to the committer identity; if specified, - it must be stuck to the option without a space. + it must be stuck to the option without a space. `--no-gpg-sign` + is useful to countermand both `commit.gpgSign` configuration variable, + and earlier `--gpg-sign`. --log[=]:: --no-log::