git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Breaking change with "git log -n" since 2.43

From
Sean Allred <allred.sean@gmail.com>
Date
Feb 21, 2024, 15:34 UTC
Message-ID
<m0v86hbze6.fsf@epic96565.epic.com>
In-Reply-To
<CAB=tB2vKj45yr3amMbhv_dYBdqYOtoiMS7Ecx4WO1TE2STHEsA@mail.gmail.com>
Maarten Ackermans <maarten.ackermans@gmail.com> writes:
Show 7 quoted lines
> I think you’re right, so reinstating the original behavior with a
> deprecation warning would be more prudent.
>
> After the grace period, if invalid input is given, fall back to output
> all with a warning. Or you can go the strict route again and crash
> with a fatal error (hard to imagine an actual use case for such a
> large, specific number, anyway).

To be clear, I'm not advocating we go back to the prior behavior. I'm just clarifying what your proposal would mean.

I don't pretend to have any nuanced understanding of how the Git project handles situations like this, but IMHO, I would have to fall back to the principle of least surprise. Rejecting invalid input is not a crash -- it is a useful guardrail to ensure the user and the computer agree on what's been requested / what's going to happen.

Again, I don't have any experience with how similar situations are handled here, but I would contend that the behavior you describe as the breaking behavior is the behavior that should exist long-term.

-- Sean Allred

Previous: Jeff King
Message 10 of 10 in “Breaking change with "git log -n" since 2.43”
  1. Maarten AckermansFeb 21, 2024
  2. Kristoffer HaugsbakkFeb 21, 2024
  3. Maarten AckermansFeb 21, 2024
  4. Sean AllredFeb 21, 2024
  5. Maarten AckermansFeb 21, 2024
  6. Sean AllredFeb 21, 2024
  7. Kristoffer HaugsbakkFeb 21, 2024
  8. Kristoffer HaugsbakkFeb 21, 2024
  9. Jeff KingFeb 21, 2024
  10. Sean AllredFeb 21, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.