From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [BUG] "git range-diff" does not know X^! is a valid range
Date: Tue, 02 Apr 2024 10:45:46 -0700 [thread overview]
Message-ID: <xmqq7chf64l1.fsf@gitster.g> (raw)
When cherry-picking an existing commit X to a different base, which
may have resulted in conflicts that needed a fix-up, you would want
to be able to compare X~1..X and HEAD~1..HEAD and naturally, we
would expect "range-diff" to have a handy way to allow giving the
command without having to type the overly long branch name X twice.
Individual "diff" for these two ranges are easy to obtain without
repeating X:
$ git diff X^!
$ git diff HEAD^!
The "git range-diff" however does not understand that X^! is a valid
range X~1..X. This command throws an error and ...
$ git range-diff refs/merge-fix/ew/khash-to-khashl^! HEAD^!
fatal: need two commit ranges
... to add insult to injury, it shows the huge "git range-diff -h"
output after that.
Any takers?
next reply other threads:[~2024-04-02 17:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 17:45 Junio C Hamano [this message]
2024-04-02 20:24 ` [BUG] "git range-diff" does not know X^! is a valid range René Scharfe
2024-04-02 20:37 ` 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=xmqq7chf64l1.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).