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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 22, 2009, 17:28 UTC
Message-ID
<7v8wp36yhw.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1232642245-94405-2-git-send-email-arjen@yaph.org>
Arjen Laarhoven <arjen@yaph.org> 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?
Show 11 quoted lines
> 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
Previous: Arjen Laarhoven
Message 3 of 3 in “t/t4202-log.sh: Add testcases”
  1. 1/2 t/t4202-log.sh: Add testcasesArjen Laarhoven, Jan 22, 2009
  2. 2/2 git-log: Follow file copies with 'git log --follow -C -C'Arjen Laarhoven, Jan 22, 2009
  3. Junio C HamanoJan 22, 2009

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.