Re: Bug report - Apple git
- From
- Kristoffer 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/