From: Taylor Blau <me@ttaylorr.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Taylor Blau <me@ttaylorr.com>,
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH 0/6] Optionally restrict range-diff output to "left" or "right" range only
Date: Fri, 5 Feb 2021 15:05:50 -0500 [thread overview]
Message-ID: <YB2lHmLxe8ArFz0v@nand.local> (raw)
In-Reply-To: <xmqqtuqr2uz3.fsf@gitster.c.googlers.com>
On Thu, Feb 04, 2021 at 04:56:16PM -0800, Junio C Hamano wrote:
> > I'd add an additional use-case, which is ignoring new commits from
> > upstream when displaying a range-diff in rerolled patch series.
> >
> > Oftentimes I'll find that the automatically-prepared range diff that
> > 'git format-patch --cover-letter --range-diff' generates will include
> > new commits from upstream, so these new options should help me ignore
> > those in the output.
>
> Do you mean that the new round is based on an updated upstream
> commit, while the old series was based on a bit older upstream?
> After rebasing your topic, "range-diff @{1}..." would find the
> updates in the base (made in the upstream) plus the new round of
> your work on the right hand side of the symmetric range, while the
> left hand side solely consists of your old round (unless the
> upstream rewound their work, which should not happen). But that
> must not be it, I guess, because in such a case, among the commits
> in @{1}..HEAD, we cannot (eh, at least range-diff cannot) tell which
> one came from upstream and which one came from our fingers.
>
> So I am a bit puzzled there.
I'm talking about a situation where a later re-roll is based of of a
newer upstream. But your judgement is right: upstream's updates look
like "new" commits on the right-hand side.
I have some scripts built around this, but they all boil down to passing
'--range-diff=@{1}' (where @{1} is the tip of the previous reroll) to
format-patch. See:
https://github.com/ttaylorr/dotfiles/blob/work-gh/bin/git-mail#L8-L10
for details.
IIUC this series, I think I'd also want to start passing '--left-only'
to ignore the new commits from upstream in a range-diff, no?
Thanks,
Taylor
next prev parent reply other threads:[~2021-02-05 20:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 20:07 [PATCH 0/6] Optionally restrict range-diff output to "left" or "right" range only Johannes Schindelin via GitGitGadget
2021-02-04 20:07 ` [PATCH 1/6] range-diff: avoid leaking memory in two error code paths Johannes Schindelin via GitGitGadget
2021-02-04 20:07 ` [PATCH 2/6] range-diff: libify the read_patches() function again Johannes Schindelin via GitGitGadget
2021-02-04 20:07 ` [PATCH 3/6] range-diff: simplify code spawning `git log` Johannes Schindelin via GitGitGadget
2021-02-04 20:07 ` [PATCH 4/6] range-diff: combine all options in a single data structure Johannes Schindelin via GitGitGadget
2021-02-04 23:56 ` Eric Sunshine
2021-02-05 14:13 ` Johannes Schindelin
2021-02-04 20:07 ` [PATCH 5/6] range-diff: move the diffopt initialization down one layer Johannes Schindelin via GitGitGadget
2021-02-04 20:07 ` [PATCH 6/6] range-diff: offer --left-only/--right-only options Johannes Schindelin via GitGitGadget
2021-02-04 22:41 ` [PATCH 0/6] Optionally restrict range-diff output to "left" or "right" range only Junio C Hamano
2021-02-04 22:48 ` Taylor Blau
2021-02-05 0:56 ` Junio C Hamano
2021-02-05 10:11 ` Jeff King
2021-02-08 22:36 ` Johannes Schindelin
2021-02-05 20:05 ` Taylor Blau [this message]
2021-02-05 14:46 ` [PATCH v2 " Johannes Schindelin via GitGitGadget
2021-02-05 14:46 ` [PATCH v2 1/6] range-diff: avoid leaking memory in two error code paths Johannes Schindelin via GitGitGadget
2021-02-05 14:46 ` [PATCH v2 2/6] range-diff: libify the read_patches() function again Johannes Schindelin via GitGitGadget
2021-02-05 14:46 ` [PATCH v2 3/6] range-diff: simplify code spawning `git log` Johannes Schindelin via GitGitGadget
2021-02-05 14:46 ` [PATCH v2 4/6] range-diff: combine all options in a single data structure Johannes Schindelin via GitGitGadget
2021-02-05 14:46 ` [PATCH v2 5/6] range-diff: move the diffopt initialization down one layer Johannes Schindelin via GitGitGadget
2021-02-05 14:46 ` [PATCH v2 6/6] range-diff: offer --left-only/--right-only options Johannes Schindelin via GitGitGadget
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=YB2lHmLxe8ArFz0v@nand.local \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
/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 NNTP newsgroup(s).