sparse-checkout: improve OS ls compatibility
commit761e3d26bbe44c51f83c4f1ad198461f57029ebd
authorEd Maste <emaste@FreeBSD.org>
Fri, 20 Dec 2019 19:41:14 +0000 (20 19:41 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Dec 2019 20:47:08 +0000 (20 12:47 -0800)
treecf8685769b91637bae2f67139fc159519044b7bc
parent190a65f9db8db9d87d54351429f7879fcb4ad608
sparse-checkout: improve OS ls compatibility

On FreeBSD, when executed by root ls enables the '-A' option:

  -A  Include directory entries whose names begin with a dot (`.')
      except for . and ...  Automatically set for the super-user unless
      -I is specified.

As a result the .git directory appeared in the output when run as root.
Simulate no-dotfile ls behaviour using a shell glob.

Helped-by: Eric Wong <e@80x24.org>
Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Ed Maste <emaste@FreeBSD.org>
Acked-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1091-sparse-checkout-builtin.sh