From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [BUG?] "format-patch --range-diff=$commit HEAD^ HEAD" fails
Date: Fri, 19 Apr 2024 10:17:18 -0700 [thread overview]
Message-ID: <xmqqbk65jmqp.fsf@gitster.g> (raw)
Immediately after "git commit --amend" of a single commit,
this fails:
$ git format-patch --range-diff=@{1} -v2 HEAD^ HEAD
fatal: --range-diff requires --cover-letter or single patch
The intent is very clear. I know it is a single-patch topic, and I
want to show what I changed with "commit --amend" as a reference to
the previous version. These, on the other hand, that specify the
range of commits to be emitted correctly recognises that we are
talking about a single patch and does not fail.
$ git format-patch --range-diff=@{1} -v2 HEAD^
$ git format-patch --range-diff=@{1} -v2 -1
It seems to me that the traditional "format-patch <since> <until>"
notation, which is understood by everywhere else in format-patch, is
not correctly understood by the code for "--range-diff" to make this
complaint, to recognise that the given range has only a single commit.
next reply other threads:[~2024-04-19 17:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 17:17 Junio C Hamano [this message]
2024-04-20 17:30 ` [BUG?] "format-patch --range-diff=$commit HEAD^ HEAD" fails Junio C Hamano
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=xmqqbk65jmqp.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.