Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp245096ybm; Mon, 20 May 2019 15:28:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5tje1LXeyR4PROM3q8SKOq2QpPNHN4vaeo5xOJQk4rVXHwyAAyloZu7eYvNQTeQnDM9zc X-Received: by 2002:a65:5241:: with SMTP id q1mr76100414pgp.298.1558391320915; Mon, 20 May 2019 15:28:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558391320; cv=none; d=google.com; s=arc-20160816; b=PxmN9YuHx7DhdKqDVkAZFgmOa2Llxe/a+8BTDOHY1Ia4rmRJC4lSKYNGlv4T/bHWTB ctCjx667GTR/DEUKv6SqlEwUSEyPmE6VL3QNeRvx1H3qBxd5bARLqkcJcAKu2XyeCk/h M6QS8u5rN+EpYKP3PhCXGOSVJFOBvu7PTO7VtWqPp7AKnTXFPjciwXqeKsBfSMK2jKFk okOFNyJZytEEz+WJdKRgGt2eYJB+yvGFhtYWinZxRuBBHe2fZAbnE9mQkw78y03Loby2 gmxV1/9orNFhma3fI+gIj7TIRGkF0jjRR2S0rnMxsslg0uHu6s1NgquCCS8uH+sgaYSE HXkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :user-agent:references:subject:cc:to:from:dkim-signature; bh=uXf03ubmTcfI0eT3gMSdVF3rfDP/ceSBVPh5QTAx1DQ=; b=Pn5WVSWCUJtwEXVIRdC+wJrQ2+tY1s6ZA15IFKJDD+7kbCU316jfL0v/wUQYXp4vhQ sxmG5apn6QulYYa89qcGTZiC9uo/RTT5EhjwAQrt0itdHmjh/RPLvO7B78HURHwB6Ife 1K12yWDQOG25R6csXMam15zGLSgMjCdEOMY1fmGAeB21xIpDUa0yOq/80FnjQCFF4rfJ YCCFij5ozhxQ2Wo8LkcDX7Y2lo/x6Op70dt0i99X8vhf9XwEpM8gsJQNAisRb0jTNbjn VZaz+/nciySyuTit1FZIW/PWwngSMeV1wxjt8k8U5cwylCzEaJvDZI6Rp0nvZQQGAQNb 8zKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e7MVjWec; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b193si21766365pfb.118.2019.05.20.15.28.25; Mon, 20 May 2019 15:28:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e7MVjWec; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726584AbfETW1X (ORCPT + 99 others); Mon, 20 May 2019 18:27:23 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:37375 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725763AbfETW1X (ORCPT ); Mon, 20 May 2019 18:27:23 -0400 Received: by mail-ed1-f67.google.com with SMTP id w37so26136299edw.4; Mon, 20 May 2019 15:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:user-agent:in-reply-to:date :message-id:mime-version; bh=uXf03ubmTcfI0eT3gMSdVF3rfDP/ceSBVPh5QTAx1DQ=; b=e7MVjWec7GQw3w2k9lvFzirVq2tq/HIjKWCqbw8Rni9lUQ9jGjussUrzeAsl7Ib2jG 0snkUptiGx3SZh14M9GSA8uY49tKqgVf02iYSWYpNDFBBi4gDEWzpi+5kUM/Xr7l54aw sz6PoRqr+7fY/dwVvMps3nrlZUtupZDfh+9LEwxe4ZCLg6E3dWoa+yENoeK0QOzW/HS4 G2wyuX8DivG07NCWQmbfOtXkWKu5inMTT+i9RRVLoP9OF8lfs1lf0MXNhcttX7PVvUP+ aZu1G4DO+wRxM544gMI/HGawJJ41gJG6DVugX9f4nS9mtOyYh31XyIa3T5itOHVTWDZ2 yK9Q== 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:references:user-agent :in-reply-to:date:message-id:mime-version; bh=uXf03ubmTcfI0eT3gMSdVF3rfDP/ceSBVPh5QTAx1DQ=; b=hn/Rwa11WliLAJFOXLvTVhq7zM1ILAG5HZk0g4pi06mvCILrnhMyyxrxJ7U+Hgi2Nu O29zt/SLYgDSS//m8U66iFjJTqaSpPjcRWlJtRg7wPJafXR3N6BSKuvLeUVqZtl1A+Th muLrBdA/CuCB4RYSeYoI6cSBLpEDPTpkOhmKkVkJb6p0ctb/uRQkebn3gKPUyIpBdvO7 PD5Ev0YPIGygEXyz4H7/qYyE6bDLl/PaR9pm5djB3EbOxuMv2/PmeapdYTDYefd/SM/M gEkXDqBLhqThY4t0FKVQybh3CdmyMGaBkRv6wpdZjQhtSCV1JbI6rwsnGhUDHOd2mcQb QxGA== X-Gm-Message-State: APjAAAUWsKOaocUK+xXvgsQmzAdnnAjnvm3KSDa+xztd6vKKj82M6Arg 9DqTScZkfRCyyjqiOax/Ht8= X-Received: by 2002:a50:a535:: with SMTP id y50mr78577263edb.249.1558391241195; Mon, 20 May 2019 15:27:21 -0700 (PDT) Received: from evledraar (dhcp-077-251-215-224.chello.nl. [77.251.215.224]) by smtp.gmail.com with ESMTPSA id g11sm5835232eda.42.2019.05.20.15.27.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 May 2019 15:27:20 -0700 (PDT) From: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason To: Bryan Turner Cc: Junio C Hamano , Git Users , Linux Kernel , git-packagers@googlegroups.com, =?utf-8?B?Tmd1eeG7hW4gVGjDoWkgTmfhu41j?= Duy Subject: Re: [ANNOUNCE] Git v2.22.0-rc1 References: User-agent: Debian GNU/Linux buster/sid; Emacs 26.1; mu4e 1.1.0 In-reply-to: Date: Tue, 21 May 2019 00:27:19 +0200 Message-ID: <87ef4svk1k.fsf@evledraar.gmail.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 20 2019, Bryan Turner wrote: > On Sun, May 19, 2019 at 10:00 AM Junio C Hamano wrote: >> >> * The diff machinery, one of the oldest parts of the system, which >> long predates the parse-options API, uses fairly long and complex >> handcrafted option parser. This is being rewritten to use the >> parse-options API. > > It looks like with these changes it's no longer possible to use "-U" > (or, I'd assume, "--unified") without adding an explicit number for > context lines. > > Was it not intended that a user could pass "-U" to explicitly say "I > want a unified diff with the default number of context lines"? Because > it's always worked that way, as far as I can tell (certainly since > early 1.7.x releases). Is it possible, with the new parse-options > code, to restore that behavior? Removing that is likely to be a pretty > big disruption for Bitbucket Server, which has always explicitly > passed "-U" to "git diff". If the community wants to move forward with > the change, I understand. I'm not trying to roadblock it; I'm just > listing an explicit example of something that will be significantly > affected by the change. Perhaps Git 2.22 could emit a warning about > the change in behavior and then a subsequent version could turn it > into an error, to give us (and anyone else relying on this behavior) > more time to make adjustments? > > I'm aware a unified diff is the default output, but many commands have > flags that essentially tell Git to do what it would do by default. > That can help counter changes in the default, as well as safeguarding > against new config options that allow specifying a different default > (as it were). For example, "git diff" has "--no-color", which could > override configuration and essentially applied the default > behavior--until the default configuration was changed in 1.8.4 from > "never" to "auto". By using "--no-color", even though we didn't "need" > to, we were protected against that change in the default. I don't know if argument-less -U was ever intended, but I think in light of what you're saying we should consider it a regression to fix before 2.22.0 is out. CC-ing Duy who wrote d473e2e0e8 ("diff.c: convert -U|--unified", 2019-01-27). The bug there is that the old opt_arg() code would be torelant to empty values. I noticed a similar change the other day with the --abbrev option, but didn't think it was worth noting. Maybe it's a more general problem, in both cases we had a blindspot in our tests.