Re: Breaking change with "git log -n" since 2.43
- From
Sean Allred <allred.sean@gmail.com>
- Date
- Feb 21, 2024, 15:17 UTC
- Message-ID
- <m0zfvtc0a4.fsf@epic96565.epic.com>
- In-Reply-To
- <CAB=tB2uZb+8QLmrk_tK5PKJtDE=RmBr=eBBb7U7ygSmkFoXvWg@mail.gmail.com>
Maarten Ackermans <maarten.ackermans@gmail.com> writes:
> I would suggest displaying a warning in case of invalid input (such as > this out of range error), and to fall back to output all as if the > "-n" flag was unspecified.
Was this the prior behavior? It sounds like from the commit you referenced, atoi() simply would've stopped parsing after a point and you'd end up with a (large, but finite) value for `-n`. I'm definitely reading between the lines here, though, and I must admit I've never provided such bogus input to git-log myself.
-- Sean Allred