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-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,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 35DC51F953 for ; Mon, 13 Dec 2021 19:16:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234461AbhLMTQ3 (ORCPT ); Mon, 13 Dec 2021 14:16:29 -0500 Received: from pb-smtp21.pobox.com ([173.228.157.53]:57514 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231878AbhLMTQ2 (ORCPT ); Mon, 13 Dec 2021 14:16:28 -0500 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 04B1815D28A; Mon, 13 Dec 2021 14:16:28 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=j0ekmeI4UzXMZ3jn/juz0dkvwiMNRTpMxJPx5O QMvtc=; b=yLlwxLs7KWxw1maj/y/yZCSZcapIABuylRjwW0n84i5Amdjrk+DDXo mbKlSYPz7bnIX4ruEeTeIYbmKWbFVTYZoMf16SM6aKEvWAN5rWabTqt2E6wpvmyI +WphbkcpefJj9n/x53VyS0Q54VdNdsCawHrh+yKmCaLaoyri9JxV0= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id F081215D289; Mon, 13 Dec 2021 14:16:27 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [104.133.2.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 4C47915D288; Mon, 13 Dec 2021 14:16:24 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: Derrick Stolee Cc: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Elijah Newren , Derrick Stolee via GitGitGadget , Git Mailing List , Victoria Dye , Derrick Stolee , Derrick Stolee Subject: Re: [PATCH 2/2] ls-files: add --sparse option References: <211123.86h7c3wrg2.gmgdl@evledraar.gmail.com> <03a642fc-6310-1ea4-083e-9fe4530cf761@gmail.com> <211209.86v8zydjjl.gmgdl@evledraar.gmail.com> <745e79e3-521d-58bd-2ddf-1da4e0f6fe26@gmail.com> Date: Mon, 13 Dec 2021 11:16:22 -0800 In-Reply-To: <745e79e3-521d-58bd-2ddf-1da4e0f6fe26@gmail.com> (Derrick Stolee's message of "Fri, 10 Dec 2021 08:57:29 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 29ADC1B0-5C49-11EC-B132-98D80D944F46-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Derrick Stolee writes: > You're talking about this hunk, right? > > if test -z "$GIT_TEST_CMP" > then > if test -n "$GIT_TEST_CMP_USE_COPIED_CONTEXT" > then > GIT_TEST_CMP="$DIFF -c" > else > GIT_TEST_CMP="$DIFF -u" > fi > fi > > This only switches from "diff -u" to "diff -c" if the > GIT_TEST_CMP_USE_COPIED_CONTEXT variable is set, but it is not set > by default. Thus, we are using "diff -u" by default throughout. That it can be set merely means that somebody needed to work around the lack of "-u" format in their implementation of "diff". It came to POSIX only at the Issue 7 of the standard (cf. [*1*]). Unconditional use of "diff -u" is a breaking change for them. If these people still exist, that is ;-) [Reference] *1* https://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html The Open Group Base Specifications Issue 7, 2018 edition