From patchwork Mon Jul 15 12:41:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ariadne Conill X-Patchwork-Id: 11043703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6CCC41395 for ; Mon, 15 Jul 2019 12:41:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C14927FAC for ; Mon, 15 Jul 2019 12:41:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F7EF284A3; Mon, 15 Jul 2019 12:41:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA02927FAC for ; Mon, 15 Jul 2019 12:41:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730071AbfGOMlO (ORCPT ); Mon, 15 Jul 2019 08:41:14 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:38839 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728933AbfGOMlN (ORCPT ); Mon, 15 Jul 2019 08:41:13 -0400 Received: by mail-oi1-f196.google.com with SMTP id v186so12494817oie.5 for ; Mon, 15 Jul 2019 05:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dereferenced-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IzrC3Sfh+R6eo+w49D/KvQXTvmTtInV0HgXeoh06Cks=; b=gIWM/1UOCBSqmSPhfXa2iE+cX4ApXokJ3Ed94u3Dpg6Yz7sFuC2RogBeRV556dbvDJ r2/eurIVXm1w8kiTZtNM48IcrPfWs1CB7Dkb2g/a491PM9AOykS4Iv9xbt6uCNNiO+YY 48YkR81zmZmwkdsHtAVDLZ+qlJVOAegkEPcbAAyQ0tES+0DFtiCaIlDHy+fN7x5sfpfA x1KSjkeIkgJ7FJskeKcUbpdE1RY6NuaKbOynnoaOzR9wB0TVWoX4vLvHimXhNR57Cy+i SMomxE4/0j69Hf5eSdrBvKX0J4sRcFyb9gqvIPzOMBA0So21ycFQYLiCiLPdbjczuX2j ND3A== 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; bh=IzrC3Sfh+R6eo+w49D/KvQXTvmTtInV0HgXeoh06Cks=; b=Uoso+e4l7ktI9FHEJB0LDHg8ERb5SXsRWFQ41Anrd3UUUz5mUFIwXpKs3A4eWYgJ9/ Ef1pUzaWZtzs5FMwC8l/IlilP3XamqMpNpO9zg8rPIY6qIhMAm/AaV/kBzxHc0PguYdA J4vxtWsDayzwpjN3I84E9l4C4bn2/oNgX6aate5ao7OrNLNicb1cjbUA2/xsrpc8/49B XiAGfhzfyeNBbOq9mOxhAdxAbSsnjqo4ya06wWKjgM+9FwysVim0hQgX0VL6q1zopNYB kAMfVLezAoZMBt5McgpBhIYMCXWjb9XVDXejqb/cZGapnS/qmvw31H2WVod1dE6nBG2D uwgg== X-Gm-Message-State: APjAAAV/CKEgIG3hJXgCFmrqn6jlSRN+jo4iHJ1frSMhN65hebDIIizy JhY31ZodfBNQHtXb05+5QNz4VHvU X-Google-Smtp-Source: APXvYqxmfNX1FzsOkX3n0VwKTqlxVlhqB0cffb1Rmd90YLsGeN13WhCU1nS7ef/afR2+w02r64MwKg== X-Received: by 2002:aca:fdc3:: with SMTP id b186mr11882850oii.114.1563194472992; Mon, 15 Jul 2019 05:41:12 -0700 (PDT) Received: from nanabozho.attlocal.net ([2600:1700:8660:6160:5c00:b322:c4d8:3df5]) by smtp.gmail.com with ESMTPSA id q17sm6085893otf.54.2019.07.15.05.41.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 05:41:12 -0700 (PDT) From: Ariadne Conill To: git@vger.kernel.org Cc: Ariadne Conill Subject: [PATCH v3 1/3] log: add warning for unspecified log.mailmap setting Date: Mon, 15 Jul 2019 07:41:04 -0500 Message-Id: <20190715124106.12642-2-ariadne@dereferenced.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190715124106.12642-1-ariadne@dereferenced.org> References: <20190715124106.12642-1-ariadne@dereferenced.org> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Based on discussions around changing the log.mailmap default to being enabled, it was decided that a transitional period is required. Accordingly, we announce this transitional period with a warning message. Signed-off-by: Ariadne Conill --- builtin/log.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index 7c8767d3bc..1cf9e37736 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -47,7 +47,7 @@ static int default_follow; static int default_show_signature; static int decoration_style; static int decoration_given; -static int use_mailmap_config; +static int use_mailmap_config = -1; static const char *fmt_patch_subject_prefix = "PATCH"; static const char *fmt_pretty; @@ -63,9 +63,14 @@ struct line_opt_callback_data { struct string_list args; }; +static int session_is_interactive(void) +{ + return isatty(1) || pager_in_use(); +} + static int auto_decoration_style(void) { - return (isatty(1) || pager_in_use()) ? DECORATE_SHORT_REFS : 0; + return session_is_interactive() ? DECORATE_SHORT_REFS : 0; } static int parse_decoration_style(const char *value) @@ -151,6 +156,16 @@ static void cmd_log_init_defaults(struct rev_info *rev) parse_date_format(default_date_mode, &rev->date_mode); } +static char warn_unspecified_mailmap_msg[] = +N_("log.mailmap is not set; its implicit value will change in an\n" + "upcoming release. To squelch this message and preserve current\n" + "behaviour, set the log.mailmap configuration value to false.\n" + "\n" + "To squelch this message and adopt the new behaviour now, set the\n" + "log.mailmap configuration value to true.\n" + "\n" + "See 'git help config' and search for 'log.mailmap' for further information."); + static void cmd_log_init_finish(int argc, const char **argv, const char *prefix, struct rev_info *rev, struct setup_revision_opt *opt) { @@ -199,6 +214,13 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix, memset(&w, 0, sizeof(w)); userformat_find_requirements(NULL, &w); + if (mailmap < 0) { + if (session_is_interactive() && !rev->pretty_given) + warning("%s\n", _(warn_unspecified_mailmap_msg)); + + mailmap = 0; + } + if (!rev->show_notes_given && (!rev->pretty_given || w.notes)) rev->show_notes = 1; if (rev->show_notes) From patchwork Mon Jul 15 12:41:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ariadne Conill X-Patchwork-Id: 11043707 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9BB8A1510 for ; Mon, 15 Jul 2019 12:41:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C49327FC0 for ; Mon, 15 Jul 2019 12:41:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 808BC27C05; Mon, 15 Jul 2019 12:41:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB3BF27FC0 for ; Mon, 15 Jul 2019 12:41:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730089AbfGOMlP (ORCPT ); Mon, 15 Jul 2019 08:41:15 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:41824 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728933AbfGOMlP (ORCPT ); Mon, 15 Jul 2019 08:41:15 -0400 Received: by mail-ot1-f65.google.com with SMTP id o101so16762702ota.8 for ; Mon, 15 Jul 2019 05:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dereferenced-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=txvecSw9jqUzzh7fTMrwuQR6LGkiq6U0h8j626J3XHQ=; b=qEbsgBWc5JxAKXHqLHKSLfFwBQbYEooLPcObeFoWwPXAp+WGi5uu/llbFeAqQpn71U 1p2rpBTf3A1aiM01tfYsAUajvfoadXRR0yHpq+Dhu/jXPymyGVdbJSfHF82KtkMSmxhK D86xRDQsn3Y+3YRlD8mauPCLJcIcj8FiiTh5sDO8FboCtAG9RLkUW0XZKqoSyM3jJlBO KA+f01kMX8KnolTk2u7INtIq4Ld2EZudnUTupTaAqdgyF2j1Ht6E4Ew6xOC6tt1N6E8c kTMS5VRJ8lOQSpwe19LLPikMMnbQBrXO5h6LSXFy4grJKwZriK3MEb7523v5v19U3NXW LQvQ== 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; bh=txvecSw9jqUzzh7fTMrwuQR6LGkiq6U0h8j626J3XHQ=; b=b5duJPhF2xzeNbPMlVKFiqJL1798tBE2SLlFGY7Y7RLtcF38oQEZTP50PQDaF/07Bj /ScfN0JZPXS0ZJmCVluh/2AxAW21XtUT58p4AxKSoEOeVumiv5haaSvqv6pbEzzE93H0 AkfAuSI/KlR9eDjt6PVPFXFJKgBC8wfEcBg0LzvXRgQjgIesEJw9RxmfJ74jloCPXmPT szhhu0AQIufzxB7z69vRKsVUY3oiY8qXsJbrDDf6WNfKCGiQQrF6h9ToHo1+lOcjypE3 3tYf+1arVyRVOQaw13FVcjGEudgnPi/V9nb+r+wsQnBW7BMC2P5xHZqSVLvDi/FCUw1P 2AOQ== X-Gm-Message-State: APjAAAVXSldCCmGYPqNKxPQblqOEQyoY9qSGBB4puwZrBbzd18q/NRmx 6pzLwJcNiRiDNdYarqiI2idRAdDT X-Google-Smtp-Source: APXvYqzGYsg9onHLOyvkQnMC1y3wEg65TP96xUkaTMkr0veUshz7oBa70WCAHwCL1V44VWppZYAnSw== X-Received: by 2002:a9d:6ad7:: with SMTP id m23mr19623800otq.306.1563194474099; Mon, 15 Jul 2019 05:41:14 -0700 (PDT) Received: from nanabozho.attlocal.net ([2600:1700:8660:6160:5c00:b322:c4d8:3df5]) by smtp.gmail.com with ESMTPSA id q17sm6085893otf.54.2019.07.15.05.41.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 05:41:13 -0700 (PDT) From: Ariadne Conill To: git@vger.kernel.org Cc: Ariadne Conill Subject: [PATCH v3 2/3] documentation: mention --no-use-mailmap and log.mailmap false setting Date: Mon, 15 Jul 2019 07:41:05 -0500 Message-Id: <20190715124106.12642-3-ariadne@dereferenced.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190715124106.12642-1-ariadne@dereferenced.org> References: <20190715124106.12642-1-ariadne@dereferenced.org> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The log.mailmap setting may be explicitly set to false, which disables the mailmap feature implicity. In practice, doing so is equivalent to always using the previously undocumented --no-use-mailmap option on the command line. Accordingly, we document both the existence of --no-use-mailmap as well as briefly discuss the equivalence of it to log.mailmap=False. Signed-off-by: Ariadne Conill --- Documentation/config/log.txt | 3 ++- Documentation/git-log.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/config/log.txt b/Documentation/config/log.txt index 78d9e4453a..7798e10cb0 100644 --- a/Documentation/config/log.txt +++ b/Documentation/config/log.txt @@ -40,4 +40,5 @@ log.showSignature:: log.mailmap:: If true, makes linkgit:git-log[1], linkgit:git-show[1], and - linkgit:git-whatchanged[1] assume `--use-mailmap`. + linkgit:git-whatchanged[1] assume `--use-mailmap`, otherwise + assume `--no-use-mailmap`. False by default. diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index b02e922dc3..b406bc4c48 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -49,7 +49,7 @@ OPTIONS Print out the ref name given on the command line by which each commit was reached. ---use-mailmap:: +--[no-]use-mailmap:: Use mailmap file to map author and committer names and email addresses to canonical real names and email addresses. See linkgit:git-shortlog[1]. From patchwork Mon Jul 15 12:41:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ariadne Conill X-Patchwork-Id: 11043705 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8902613B1 for ; Mon, 15 Jul 2019 12:41:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79FAF284A5 for ; Mon, 15 Jul 2019 12:41:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E4FC284C0; Mon, 15 Jul 2019 12:41:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5B2427C05 for ; Mon, 15 Jul 2019 12:41:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730075AbfGOMlQ (ORCPT ); Mon, 15 Jul 2019 08:41:16 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:39941 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730080AbfGOMlQ (ORCPT ); Mon, 15 Jul 2019 08:41:16 -0400 Received: by mail-oi1-f195.google.com with SMTP id w196so12481332oie.7 for ; Mon, 15 Jul 2019 05:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dereferenced-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LeGAz0yRAOiGIYngIHwCQse59qL/ypm7DFPdmVYusTg=; b=EbghEL9QZ+zrj9XVeY7l4wcWTUGXgHlEdPNjVVWJYvMJat0iv9js7wFmZzNg7iQ6Hs FSBKUE7HT6qxcFXAP91KShrbMNoVnPYusqGE10HmdM54vHcGExZdG6hIsmgLBP2H2L8F a1CE6ADk/jRXVckLoQ3Nv+JP673FhFK28cAOrvPSlDK8Wu1RLLSRtP6hNBWdZTu9/On4 +rmfCAZgNXZOOeZaKR3ksbwxAB8HTi5RhsgSasAVhxWRprs+UxEftnSWLOz/VyGYKdnj IjFtvq/N1u5Gl4BrZsnuvwpeC5I93R6C/UDWZ//xfWzSK2WO1ClDf9uQ5TtOWPVABey3 d7Eg== 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; bh=LeGAz0yRAOiGIYngIHwCQse59qL/ypm7DFPdmVYusTg=; b=inqCkqwL5BKR+0VJy4bCPQvuHu/IXoQ9V8iH3rFFGA+yW8ZL7tgY5ic+CrztfWlO8g 7LSIeLOo0tSR62g3IrgMrwT4Am1XLENU0OgnxZN+B0ObSA/UOgCxSlKf04pntmCyc9O4 v30lggtsuB9qAsxOjiU/69zKaSBA2BhdvtL2pDOMcWEWc9KQpZZA0Iqupc6a47GXA6fr TaUSVF3JeDLbQwPPVv4tbhWKLRmwfFKp0xNQGETn0qHyKdXOdcpSszT3pqV7cYy/ipvC mHMwqcZM/SlbQXJYe814yZZ+ib/ek/dVXuZ0r398+O9L5E+0EQvvHvBrlVLNMma937hh E5zg== X-Gm-Message-State: APjAAAVY2TLAkYo/dTKcwjUROeLtL5zZqPU+EAtL/ym9JQDMQd6VkP+3 pCBMmLAJIkB6sJEkkB8Bu/nRd9Mb X-Google-Smtp-Source: APXvYqxopquCSR6Cy/VdGxUuAwpIV9DS8eQte8sh8U1ErNFNDKyli5m/Bnq5kkhioIbQzai6OlyWug== X-Received: by 2002:aca:ac48:: with SMTP id v69mr12573681oie.48.1563194475108; Mon, 15 Jul 2019 05:41:15 -0700 (PDT) Received: from nanabozho.attlocal.net ([2600:1700:8660:6160:5c00:b322:c4d8:3df5]) by smtp.gmail.com with ESMTPSA id q17sm6085893otf.54.2019.07.15.05.41.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 05:41:14 -0700 (PDT) From: Ariadne Conill To: git@vger.kernel.org Cc: Ariadne Conill Subject: [PATCH v3 3/3] tests: defang pager tests by explicitly disabling the log.mailmap warning Date: Mon, 15 Jul 2019 07:41:06 -0500 Message-Id: <20190715124106.12642-4-ariadne@dereferenced.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190715124106.12642-1-ariadne@dereferenced.org> References: <20190715124106.12642-1-ariadne@dereferenced.org> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the previous patch, we added a deprecation warning for the current log.mailmap setting. This warning only appears when git is attached to a controlling terminal. Some tests however run under an emulated terminal, so we need to disable the warning for those tests. Thanks to Junio for suggesting that we do this in the setup function. Signed-off-by: Ariadne Conill --- t/t7006-pager.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh index 00e09a375c..7976fa7bcc 100755 --- a/t/t7006-pager.sh +++ b/t/t7006-pager.sh @@ -7,6 +7,8 @@ test_description='Test automatic use of a pager.' . "$TEST_DIRECTORY"/lib-terminal.sh test_expect_success 'setup' ' + : squelch advice messages during the transition && + git config --global log.mailmap false && sane_unset GIT_PAGER GIT_PAGER_IN_USE && test_unconfig core.pager &&