From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 0C0751F55B for ; Sun, 17 May 2020 15:07:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728021AbgEQPHu (ORCPT ); Sun, 17 May 2020 11:07:50 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:64340 "EHLO pb-smtp20.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727929AbgEQPHu (ORCPT ); Sun, 17 May 2020 11:07:50 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 13C41DBB74; Sun, 17 May 2020 11:07:48 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=tEsN8+ParrLKT8m4DnW1O/7Ov7Q=; b=pq44Gh XoX0txdDePn4knqjnbBEyekkKVJ6HwfSxtORr6/nDYOssvsqVP9rWy8d7uIuAaFz EA4Ma86P9oN5wSN79jZDcQkExdQaYWPsbfgpEQ3QGu56mwIOEA1ZU6WCmVDTcdOg YiZoVeJNMv0fwQgIa3WL5T145E1MgMJYsUEis= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=rPCTrfz78HAq+vwt87RSNNJlv11eWoOl bMb7C782Lut4NKeVYTVVKF0yuEeoVEdVWEblDcjaJyhSQpbtpKDkl1lPned/Y4A+ Q2JSAxe9kD2bnlctD46f6OHZMefwdQkrGlAFGs/1j7tmqkJFbzI0YfGkm/CaqPCL Cpj1eDUhdrU= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 0AED9DBB73; Sun, 17 May 2020 11:07:48 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.196.173.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 96CCDDBB72; Sun, 17 May 2020 11:07:43 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Phillip Wood Cc: Laurent Arnoud , "brian m. carlson" , git@vger.kernel.org Subject: Re: [PATCH v3] diff: add config option relative References: <20200515155706.GA1165062@spk-laptop> <20200515233130.GC6362@camp.crustytoothpaste.net> <20200516173828.GB34961@spk-laptop> <92cb6302-09a8-6780-9398-890b1e766680@gmail.com> Date: Sun, 17 May 2020 08:07:41 -0700 In-Reply-To: <92cb6302-09a8-6780-9398-890b1e766680@gmail.com> (Phillip Wood's message of "Sat, 16 May 2020 19:33:42 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 28BA3B08-9850-11EA-ACFA-B0405B776F7B-77302942!pb-smtp20.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Phillip Wood writes: >> @@ -5494,6 +5501,9 @@ static void prep_parse_options(struct diff_options *options) >> N_("when run from subdir, exclude changes outside and show relative paths"), >> PARSE_OPT_NONEG | PARSE_OPT_OPTARG, >> diff_opt_relative), >> + OPT_SET_INT_F(0, "no-relative", &options->flags.relative_name, >> + N_("disable diff.relative config option"), >> + 0, PARSE_OPT_NONEG), > > Rather than adding a new option, it would be better to modify the > existing --relative option. If you remove PARSE_OPT_NONEG from the > declaration above it will support --no-relative. You will also need to > modify diff_opt_relative() to handle clearing the option. Excellent.