Re: [PATCH] t5319: don't trip over a user name with whitespace
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jun 30, 2019, 20:59 UTC
- Message-ID
- <1a5bb5f9-e090-7f42-ec3f-cd74bcad831f@kdbg.org>
- In-Reply-To
- <CAPig+cRpOHRgtCXXiqAZtmEtkWnMy7=4GsTVv0XB9R3fF0-66A@mail.gmail.com>
Am 30.06.19 um 21:48 schrieb Eric Sunshine:
Show 10 quoted lines
> On Sun, Jun 30, 2019 at 2:57 PM Johannes Sixt <j6t@kdbg.org> wrote:
>> diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh
>> @@ -443,7 +443,7 @@ test_expect_success 'repack with minimum size does not alter existing packs' '
>> - MINSIZE=$(ls -l .git/objects/pack/*pack | awk "{print \$5;}" | sort -n | head -n 1) &&
>> + MINSIZE=$(stat -c %s .git/objects/pack/*pack | sort -n | head -n 1) &&
>
> Unfortunately, this is not portable. While "stat -c %s" works on Linux
> and MSYS2, neither that option nor the format directive are recognized
> on BSD-like platforms (I tested Mac OS and FreeBSD), which instead
> need "stat -f %z".Ouch! I did notice that stat(1) is not in POSIX, but hoped that it was sufficiently portable. I need a new idea...
-- Hannes