Re: [PATCH] refs.c: enable large transactions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 21, 2015, 18:00 UTC
- Message-ID
- <xmqqpp6xgy50.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAGZ79kay11Pd4ni1j6jSYbenSXVfUP-6irPBc_r1=gUZFe-Hjw@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 14 quoted lines
> 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.