git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
	Philippe Blain <levraiphilippeblain@gmail.com>,
	Elijah Newren <newren@gmail.com>
Subject: Re: [PATCH v2 1/3] diff: have submodule_format logic avoid additional diff headers
Date: Thu, 01 Sep 2022 09:30:00 -0700	[thread overview]
Message-ID: <xmqqedwvawhj.fsf@gitster.g> (raw)
In-Reply-To: <aea0bbc1c6a33d62f6b3313d56664d53df8f620a.1662016087.git.gitgitgadget@gmail.com> (Elijah Newren via GitGitGadget's message of "Thu, 01 Sep 2022 07:08:05 +0000")

"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:


As there is no guarantee that we'd never add another hack to use a
different kind of "phoney" filepair to diff_queue for another
purpose, either the name of the helper function, or a comment in
front of it, should say something that is sufficient to help readers
understand ...

> +static int diff_filepair_is_phoney(struct diff_filespec *one,
> +				   struct diff_filespec *two)
> +{
> +	return !DIFF_FILE_VALID(one) && !DIFF_FILE_VALID(two);
> +}
> ...
> -	if (!DIFF_FILE_VALID(one) && !DIFF_FILE_VALID(two)) {
> +	if (diff_filepair_is_phoney(one, two)) {
>  		/*
>  		 * We should only reach this point for pairs from
>  		 * create_filepairs_for_header_only_notifications().  For

... some of what this comment said, i.e. the pair that was added by
create_filepairs_for_header_only_notifications() is what the helper
detects. 

Other than that, the whole series looks good.

  reply	other threads:[~2022-09-01 16:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31  6:21 [PATCH 0/3] Output fixes for --remerge-diff Elijah Newren via GitGitGadget
2022-08-31  6:21 ` [PATCH 1/3] diff: have submodule_format logic avoid additional diff headers Elijah Newren via GitGitGadget
2022-08-31 22:20   ` Junio C Hamano
2022-09-01  3:44     ` Elijah Newren
2022-08-31  6:21 ` [PATCH 2/3] diff: fix filtering of additional headers under --remerge-diff Elijah Newren via GitGitGadget
2022-08-31 22:26   ` Junio C Hamano
2022-09-01  3:38     ` Elijah Newren
2022-08-31  6:21 ` [PATCH 3/3] diff: fix filtering of merge commits " Elijah Newren via GitGitGadget
2022-09-01  1:13 ` [PATCH 0/3] Output fixes for --remerge-diff Junio C Hamano
2022-09-01  3:47   ` Elijah Newren
2022-09-01  4:01     ` Elijah Newren
2022-09-01 15:24     ` Junio C Hamano
2022-09-01 18:46       ` Ævar Arnfjörð Bjarmason
2022-09-01 19:54         ` Junio C Hamano
2022-09-01  7:08 ` [PATCH v2 " Elijah Newren via GitGitGadget
2022-09-01  7:08   ` [PATCH v2 1/3] diff: have submodule_format logic avoid additional diff headers Elijah Newren via GitGitGadget
2022-09-01 16:30     ` Junio C Hamano [this message]
2022-09-01  7:08   ` [PATCH v2 2/3] diff: fix filtering of additional headers under --remerge-diff Elijah Newren via GitGitGadget
2022-09-01  7:08   ` [PATCH v2 3/3] diff: fix filtering of merge commits " Elijah Newren via GitGitGadget
2022-09-02  3:53   ` [PATCH v3 0/3] Output fixes for --remerge-diff Elijah Newren via GitGitGadget
2022-09-02  3:53     ` [PATCH v3 1/3] diff: have submodule_format logic avoid additional diff headers Elijah Newren via GitGitGadget
2022-09-02  3:53     ` [PATCH v3 2/3] diff: fix filtering of additional headers under --remerge-diff Elijah Newren via GitGitGadget
2022-09-02  3:53     ` [PATCH v3 3/3] diff: fix filtering of merge commits " Elijah Newren 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqedwvawhj.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=levraiphilippeblain@gmail.com \
    --cc=newren@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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).