RE: [PATCH v2 26/33] diff-merges: let new options enable diff without -p

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

 



Sergey Organov wrote:
> diff --git a/log-tree.c b/log-tree.c
> index f9385b1dae6f..67060492ca0a 100644
> --- a/log-tree.c
> +++ b/log-tree.c
> @@ -899,15 +899,21 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
>  	int showed_log;
>  	struct commit_list *parents;
>  	struct object_id *oid;
> +	int is_merge;
> +	int regulars_need_diff = opt->diff || opt->diffopt.flags.exit_with_status;
>  
> -	if (!opt->diff && !opt->diffopt.flags.exit_with_status)
> +	if (!regulars_need_diff && !opt->merges_need_diff)
>  		return 0;
>  
>  	parse_commit_or_die(commit);
>  	oid = get_commit_tree_oid(commit);
>  
> -	/* Root commit? */
>  	parents = get_saved_parents(opt, commit);
> +	is_merge = parents && parents->next;
> +	if(!is_merge && !regulars_need_diff)
> +		return 0;

Missed a space:

        if (!is_merge && !regulars_need_diff)

-- 
Felipe Contreras



[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