git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ed Maste <emaste@freebsd.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eric Wong <e@80x24.org>, git mailing list <git@vger.kernel.org>,
	Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Subject: Re: [PATCH] sparse-checkout: improve OS ls compatibility
Date: Thu, 19 Dec 2019 15:56:39 -0500	[thread overview]
Message-ID: <CAPyFy2BubWbyq6tQmHYxquikn2+uHz+48VSfQ308BYiuE=SSWQ@mail.gmail.com> (raw)
In-Reply-To: <xmqqpngkb2ye.fsf@gitster-ct.c.googlers.com>

On Thu, 19 Dec 2019 at 13:11, Junio C Hamano <gitster@pobox.com> wrote:
>
> Hmph, my honest me is very tempted to say
>
>  (1) don't run your tests as 'root', as that would break many tests
>      with prerequisite SANITY

It looks like this is just Cirrus-CI's default without explicit
configuration or scripting to use an unprivileged user. Certainly
running the build and test as root is generally not a good idea, but
it is a purpose-built throwaway VM and so doesn't matter much. Anyhow,
it certainly needs to be addressed to avoid skipping the SANITY tests.

>  (2) fix your "ls" to behave

Well, given that hidden dot files were ostensibly a bug and BSD ls has
had this behaviour for over 40 years it's far too late to change. I
can see the rationale for showing all files for root, even though I
dislike the behaviour changing between privileged and unprivileged
users.

> but if you want to list paths that match shell glob *, this would do
>
>         (cd "$1" && printf "%s\n *)
>
> without any loop (other than the one printf gives us implicitly for
> free), wouldn't it?

Yes.

> 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.

  reply	other threads:[~2019-12-19 20:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19  1:58 [PATCH] sparse-checkout: improve OS ls compatibility Ed Maste
2019-12-19  2:07 ` Derrick Stolee
2019-12-19  2:18   ` Ed Maste
2019-12-19  2:22     ` Derrick Stolee
2019-12-19  2:45 ` Eric Wong
2019-12-19 13:56   ` Derrick Stolee
2019-12-19 16:15     ` Ed Maste
2019-12-19 16:34       ` Derrick Stolee
2019-12-19 18:11   ` Junio C Hamano
2019-12-19 20:56     ` Ed Maste [this message]
2019-12-19 22:01       ` Junio C Hamano
2019-12-19 21:45 ` [PATCH v2] " Ed Maste
2019-12-19 22:27   ` Denton Liu
2019-12-20 15:38 ` [PATCH v3] " Ed Maste
2019-12-20 16:05   ` Derrick Stolee
2019-12-20 17:55     ` Junio C Hamano
2019-12-20 17:55   ` Eric Sunshine
2019-12-20 18:15     ` Ed Maste
2019-12-20 18:21     ` Junio C Hamano
2019-12-20 18:34       ` Eric Sunshine
2019-12-20 18:34       ` Ed Maste
2019-12-20 19:23         ` Junio C Hamano
2019-12-20 19:33           ` Eric Sunshine
2019-12-20 19:41 ` [PATCH v4] " Ed Maste

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPyFy2BubWbyq6tQmHYxquikn2+uHz+48VSfQ308BYiuE=SSWQ@mail.gmail.com' \
    --to=emaste@freebsd.org \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).