* [BUG?] "format-patch --range-diff=$commit HEAD^ HEAD" fails
@ 2024-04-19 17:17 Junio C Hamano
2024-04-20 17:30 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Junio C Hamano @ 2024-04-19 17:17 UTC (permalink / raw
To: git
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [BUG?] "format-patch --range-diff=$commit HEAD^ HEAD" fails
2024-04-19 17:17 [BUG?] "format-patch --range-diff=$commit HEAD^ HEAD" fails Junio C Hamano
@ 2024-04-20 17:30 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2024-04-20 17:30 UTC (permalink / raw
To: git
Junio C Hamano <gitster@pobox.com> writes:
> Immediately after "git commit --amend" of a single commit,
> this fails:
>
> $ git format-patch --range-diff=@{1} -v2 HEAD^ HEAD
Please scratch this one. I simply forgot that we have lost
the
git format-patch <his> <mine>
syntax long time ago during Git 1.4.0 timeframe [*]. I somehow was
confused since we still have the corresponding
rebase <since-onto> <mine>
syntax.
[Footnote]
* I suspect this may not have been a conscious design decision but
by accident during the rewrite of the command in C that I started
at 3eefc189 (Tentative built-in format-patch., 2006-04-18) and
whose final shape was documented by 2052d146 (Update
documentation for git-format-patch, 2006-05-31).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-20 17:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-19 17:17 [BUG?] "format-patch --range-diff=$commit HEAD^ HEAD" fails Junio C Hamano
2024-04-20 17:30 ` Junio C Hamano
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.