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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Elijah Newren via GitGitGadget" <gitgitgadget@xxxxxxxxx> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux