Re: [PATCH] tests: consolidate the `file_size` function into `test-lib-functions.sh`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-11-07 at 01:12:57, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <johannes.schindelin@xxxxxx>
> 
> In 8de7eeb54b6 (compression: unify pack.compression configuration
> parsing, 2016-11-15), we introduced identical copies of the `file_size`
> helper into three test scripts, with the plan to eventually consolidate
> them into a single copy.
> 
> Let's do that, and adjust the function name to adhere to the `test_*`
> naming convention.
> 
> Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>

This seems reasonable.  For a moment, I was going to ask why we didn't
just use test -s, but then I remembered that test -s doesn't have that
behavior, Perl's -s does, and you replaced that with the helper for
efficiency on Windows.

I looked at the patch and it seemed pretty straightforward.

>     tests: consolidate the file_size function into test-lib-functions.sh
> 
>     My ulterior motive with this patch is not even to address that old
>     concern, but to avoid having to exclude the code comments from the
>     upcoming master -> main rename (because those code comments talk about
>     git/git's main branch, which is called master).

Also a good reason.  Why modify code when you can just delete it?
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux