Subject: Re: [PATCH] refs.c: enable large transactions

From: Junio C Hamano <[email-masked]>
Date: Tue, 21 Apr 2015 11:00:11 -0700

Stefan Beller <[email-masked]> writes:

> I thought about putting a cap on it to not let it go negative in the first
> place, but I did not find an easily accessible max() function, as I'd like
> to write it as
>
>     int remaining_fds = max(get_max_fd_limit() - 32, 0);
>
> to have it in one line. The alternative of
>
>     int remaining_fds = get_max_fd_limit() - 32;
>     ...
>     if (remaining_fds < 0)
>         remaining_fds = 0
>
> seemed to cuttered to me.

Just to set the standard yardstick straight, either is fine, but I
would say the latter is slightly preferrable from readability's
point of view.  Rows of dense single lines get tiring to read pretty
quickly.