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

Re: Bug report - Apple git

From
KHKristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Date
Jan 13, 2025, 16:32 UTC
Message-ID
<5aae11ba-b283-4d04-9336-31d02ff41c93@app.fastmail.com>
In-Reply-To
<C2871318-4745-4481-9199-72D4544ECD5C@gmail.com>
On Mon, Jan 13, 2025, at 15:23, André de Castro wrote:
Show 8 quoted lines
> Checked out a branch, ran "git diff --merge-base <some-annotated-tag> HEAD".
>
> What did you expect to happen? (Expected behavior)
> To see a normal git diff output.
>
> What happened instead? (Actual behavior)
> Didn't get a diff output. Got the following error instead:
> "fatal: --merge-base only works with commits"

This works for me on version 2.48.0. It seems to have been fixed in 2.43.0. You would have to update to a newer version.

It looks like it was fixed in 4adceb5a299 (diff: fix --merge-base with annotated tags, 2023-10-01).[1] The intent of the error message was to disallow non-commit-ish like trees:

    v2.48.0^{tree}
But it also rejected annotated tags instead of peeling them.
🔗 1: https://lore.kernel.org/git/20231001151845.3621551-1-hi@alyssa.is/
Previous: André de CastroNext: Torsten Bögershausen
Message 2 of 6 in “Bug report - Apple git”
  1. André de CastroJan 13, 2025
  2. Kristoffer HaugsbakkJan 13, 2025
  3. Torsten BögershausenJan 13, 2025
  4. D. Ben KnobleJan 14, 2025
  5. Junio C HamanoJan 14, 2025
  6. André de CastroJan 13, 2025

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.