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

Re: [PATCH] t1400: fix --no-create-reflog test and description

From
Taylor Blau <me@ttaylorr.com>
Date
Oct 21, 2024, 19:02 UTC
Message-ID
<ZxalTgct8WhEmO0w@nand.local>
In-Reply-To
<d66936b8-d12b-4035-b563-328ae9fc4824@app.fastmail.com>
On Mon, Oct 21, 2024 at 06:48:20PM +0200, Kristoffer Haugsbakk wrote:
Show 44 quoted lines
> On Mon, Oct 21, 2024, at 14:08, Patrick Steinhardt wrote:
> >> […]
> >> Notes (series):
> >>     From the commit message:
> >>
> >>       “ The test itself is fine and does not hide a bug:
> >>         `--no-create-reflog` is not supposed to override
> >>
> >>     A source for that: roundabout through git-branch(1):
> >>
> >>       “ The negated form --no-create-reflog only overrides an earlier
> >>         --create-reflog, but currently does not negate the setting of
> >>         core.logAllRefUpdates.
> >
> > Hm. The "currently" reads as if this was a known shortcoming rather than
> > by design.
>
> I read it as “we might change our minds here—watch out”.  ;)
>
> It feels very emphasized.  Like the documentation was expecting
> your surprise.
>
> >>     I *suppose* that the same applies to update-ref since (I suppose) they
> >>     use the same underlying machinery.
> >>
> >>     See also git-tag(1) which says the same thing.
> >>
> >>     update-ref should document the same thing, then.  I have that marked as
> >>     a todo item.  The changes there are a bit too involved to implicate in
> >>     this submission.
> >
> > So I'm quite torn here. It's documented, even though the documentation
> > doesn't exactly feel like this was designed, but rather like it was a
> > side effect. The test also contradicts the documentation, even though it
> > only worked by chance. And as mentioned above, everywhere else we
> > typically have a design where the command line option overrides the
> > config.
> >
> > Overall I'm rather leaning into the direction of making this work
> > properly. But that would of course be a backwards-incompatible change.
>
> Good point.  It does feel inconsistent.  I agree that the conventional
> pattern (to my knowledge) is to have options override config when the
> options are given.

I agree with you both that it feels inconsistent, but I feel somewhat uncomfortable changing the behavior here in a backwards incompatible way.

Even if the original documentation leaves the door open to changing the behavior, I think that probably a non-zero number of users has either (a) never read that documentation, or (b) come to rely on it, or (c) both ;-).

I think if anything we might consider updating the documentation to more clearly capture the status-quo, but I'd be very hesitant to see a patch changing the behavior here.

Thanks, Taylor

Previous: Kristoffer HaugsbakkNext: Kristoffer Haugsbakk
Message 4 of 8 in “t1400: fix --no-create-reflog test and description”
  1. t1400: fix --no-create-reflog test and descriptionkristofferhaugsbakk@fastmail.com, Oct 20, 2024
  2. Patrick SteinhardtOct 21, 2024
  3. Kristoffer HaugsbakkOct 21, 2024
  4. Taylor BlauOct 21, 2024
  5. Kristoffer HaugsbakkOct 21, 2024
  6. Taylor BlauOct 21, 2024
  7. Kristoffer HaugsbakkNov 7, 2024
  8. Junio C HamanoNov 8, 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.