Re: [PATCH 2/2] git-log: Follow file copies with 'git log --follow -C -C'

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

 



Arjen Laarhoven <arjen@xxxxxxxx> writes:

> When the '--follow' option is used with '--find-copies-harder' ('-C -C')
> logs on individual files will work across file copies as well as
> renames.

Is there a reason to limit this to "harder" case?

> diff --git a/tree-diff.c b/tree-diff.c
> index 9f67af6..73652b2 100644
> --- a/tree-diff.c
> +++ b/tree-diff.c
> @@ -333,6 +333,8 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
>  
>  	diff_setup(&diff_opts);
>  	DIFF_OPT_SET(&diff_opts, RECURSIVE);
> +	if (DIFF_OPT_TST(opt, FIND_COPIES_HARDER))
> +		DIFF_OPT_SET(&diff_opts, FIND_COPIES_HARDER);
>  	diff_opts.detect_rename = DIFF_DETECT_RENAME;

Hmm, why isn't this DIFF_DETECT_COPY?

>  	diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
>  	diff_opts.single_follow = opt->paths[0];
> -- 
> 1.6.1.354.gd9e51
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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