git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/3] diff: have submodule_format logic avoid additional diff headers

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 1, 2022, 16:30 UTC
Message-ID
<xmqqedwvawhj.fsf@gitster.g>
In-Reply-To
<aea0bbc1c6a33d62f6b3313d56664d53df8f620a.1662016087.git.gitgitgadget@gmail.com>
"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 ...

Show 11 quoted lines
> +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.
Previous: Elijah Newren via GitGitGadgetNext: Elijah Newren via GitGitGadget
Message 17 of 23 in “Output fixes for --remerge-diff”
  1. 0/3 Output fixes for --remerge-diffElijah Newren via GitGitGadget, Aug 31, 2022
  2. 1/3 diff: have submodule_format logic avoid additional diff headersElijah Newren via GitGitGadget, Aug 31, 2022
  3. Junio C HamanoAug 31, 2022
  4. Elijah NewrenSep 1, 2022
  5. 2/3 diff: fix filtering of additional headers under --remerge-diffElijah Newren via GitGitGadget, Aug 31, 2022
  6. Junio C HamanoAug 31, 2022
  7. Elijah NewrenSep 1, 2022
  8. 3/3 diff: fix filtering of merge commits under --remerge-diffElijah Newren via GitGitGadget, Aug 31, 2022
  9. Junio C HamanoSep 1, 2022
  10. Elijah NewrenSep 1, 2022
  11. Elijah NewrenSep 1, 2022
  12. Junio C HamanoSep 1, 2022
  13. Ævar Arnfjörð BjarmasonSep 1, 2022
  14. Junio C HamanoSep 1, 2022
  15. 0/3 Output fixes for --remerge-diffElijah Newren via GitGitGadget, Sep 1, 2022
  16. 1/3 diff: have submodule_format logic avoid additional diff headersElijah Newren via GitGitGadget, Sep 1, 2022
  17. Junio C HamanoSep 1, 2022
  18. 2/3 diff: fix filtering of additional headers under --remerge-diffElijah Newren via GitGitGadget, Sep 1, 2022
  19. 3/3 diff: fix filtering of merge commits under --remerge-diffElijah Newren via GitGitGadget, Sep 1, 2022
  20. 0/3 Output fixes for --remerge-diffElijah Newren via GitGitGadget, Sep 2, 2022
  21. 1/3 diff: have submodule_format logic avoid additional diff headersElijah Newren via GitGitGadget, Sep 2, 2022
  22. 3/3 diff: fix filtering of merge commits under --remerge-diffElijah Newren via GitGitGadget, Sep 2, 2022
  23. 2/3 diff: fix filtering of additional headers under --remerge-diffElijah Newren via GitGitGadget, Sep 2, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.