From: "Kristoffer Haugsbakk" <code@khaugsbakk.name>
To: "Maarten Ackermans" <maarten.ackermans@gmail.com>
Cc: git@vger.kernel.org, "Sean Allred" <allred.sean@gmail.com>
Subject: Re: Breaking change with "git log -n" since 2.43
Date: Wed, 21 Feb 2024 16:32:13 +0100 [thread overview]
Message-ID: <310b2dcf-df69-4984-9a92-b8485e0f715b@app.fastmail.com> (raw)
In-Reply-To: <CAB=tB2uZb+8QLmrk_tK5PKJtDE=RmBr=eBBb7U7ygSmkFoXvWg@mail.gmail.com>
On Wed, Feb 21, 2024, at 16:07, Maarten Ackermans wrote:
> 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. If more strict handling is still desired,
> it could instead be a deprecation warning with a grace period, giving
> applications some time to update their git usage.
From 71a1e9482:
“ As a natural consequence, an argument that does not begin with a
digit (e.g., "q") silently becomes zero, too.
It sounds like the non-breaking behavior for non-number input like `q`
is to silently become `0`.[1] But then that too-large number input would
also become `0`, which doesn’t help for that JavaScript
application/library. Unless `strtol_i` is able to differentiate between
different errors by returning different negative numbers?
† 1: Or else you risk breaking usages where they rely on bad input
becoming `0`
--
Kristoffer Haugsbakk
next prev parent reply other threads:[~2024-02-21 15:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 13:32 Breaking change with "git log -n" since 2.43 Maarten Ackermans
2024-02-21 13:55 ` Kristoffer Haugsbakk
2024-02-21 14:21 ` Maarten Ackermans
2024-02-21 14:24 ` Sean Allred
2024-02-21 15:07 ` Maarten Ackermans
2024-02-21 15:17 ` Sean Allred
[not found] ` <CAB=tB2vKj45yr3amMbhv_dYBdqYOtoiMS7Ecx4WO1TE2STHEsA@mail.gmail.com>
2024-02-21 15:34 ` Sean Allred
2024-02-21 15:32 ` Kristoffer Haugsbakk [this message]
2024-02-21 15:38 ` Kristoffer Haugsbakk
2024-02-21 17:51 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=310b2dcf-df69-4984-9a92-b8485e0f715b@app.fastmail.com \
--to=code@khaugsbakk.name \
--cc=allred.sean@gmail.com \
--cc=git@vger.kernel.org \
--cc=maarten.ackermans@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox