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: AS31976 209.132.180.0/23 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,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 2F9AA1F463 for ; Thu, 19 Dec 2019 22:01:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727152AbfLSWBP (ORCPT ); Thu, 19 Dec 2019 17:01:15 -0500 Received: from pb-smtp21.pobox.com ([173.228.157.53]:52306 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726866AbfLSWBP (ORCPT ); Thu, 19 Dec 2019 17:01:15 -0500 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id A215D9891A; Thu, 19 Dec 2019 17:01:14 -0500 (EST) (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=iEkzhV44fI8GbrzwxdOk7Vt5rHc=; b=Xm73Sz gDA5EkyQ3nU5uPtqLr+gvRFOjmqT4wvG45UC+aJgdY5goKMIdnQntP6WeM3TErhn 1xT0JquKnOW6y0idCFt7LREB3OwYd99wkI0nkc1IwS940rF73Z2LIX8fkD86MJe0 6jmKAnqZMES7VmgT8QEgbLlQ1MVMtDSDbB9vQ= 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=ls3I9NOyAJo4SQ8KkJLhBhdEBAsok+7z aR/LZJWwgIpE29Q1U6ogkT59p6diGXQaxJ8N+yeJ/w9m9E4qhAoFYahgYHmy1I/H /f9WmUiqAoA4j5pawYD3jAaB5wVVlC8Tc3WK8vFpzy4fmTcFP6cPRGGayjFot0Lt tQzYlgWx2Lw= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 9A31F98918; Thu, 19 Dec 2019 17:01:14 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.76.80.147]) (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 C678698915; Thu, 19 Dec 2019 17:01:11 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: Ed Maste Cc: Eric Wong , git mailing list , Derrick Stolee via GitGitGadget Subject: Re: [PATCH] sparse-checkout: improve OS ls compatibility References: <20191219015833.49314-1-emaste@FreeBSD.org> <20191219024518.GA3411@dcvr> Date: Thu, 19 Dec 2019 14:01:09 -0800 In-Reply-To: (Ed Maste's message of "Thu, 19 Dec 2019 15:56:39 -0500") 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: 1199C864-22AB-11EA-99B0-8D86F504CC47-77302942!pb-smtp21.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Ed Maste writes: >> Note that the helper function's name no longer reflects what it does >> with such a change, so it needs to be renamed. Together with style >> fix, perhaps >> >> ls_no_dot () { >> (cd "$1" && printf "%s\n *) >> } >> >> is what we want, > > I believe the tests should pass or be skipped when run as root, so I > think we should either require (something like) SANITY for these > tests, or make the change above. I'm happy with either option; I'll > send a v2 based on the approach above for consideration. OK, after thinking about it a bit more, I think "Your ls is broken" was completely missing the point. What we want in the callers of this helper is to list the contents of a directory, and "ls" is one possible (and easiest, if there were no "oops, sometimes -A is enabled implementation by default" complication) implementation. And "ls_no_dot" is a misnomer from that point of view. We are not even using "ls", so perhaps we should just call it "list_files" or something? Thanks.