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

Re: [PATCH v2] merge-recursive: option to disable renames

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 17, 2016, 00:20 UTC
Message-ID
<xmqq7fi4kx1l.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1455665175-8665-1-git-send-email-felipegassis@gmail.com>
"Felipe Gonçalves Assis"  <felipeg.assis@gmail.com> writes:
Show 15 quoted lines
> @@ -482,10 +482,13 @@ static struct string_list *get_renames(struct merge_options *o,
>  	struct diff_options opts;
>  
>  	renames = xcalloc(1, sizeof(struct string_list));
> +	if (!o->detect_rename)
> +		return renames;
> +
>  	diff_setup(&opts);
>  	DIFF_OPT_SET(&opts, RECURSIVE);
>  	DIFF_OPT_CLR(&opts, RENAME_EMPTY);
> -	opts.detect_rename = DIFF_DETECT_RENAME;
> +	opts.detect_rename = o->detect_rename;
>  	opts.rename_limit = o->merge_rename_limit >= 0 ? o->merge_rename_limit :
>  			    o->diff_rename_limit >= 0 ? o->diff_rename_limit :
>  			    1000;

I do not think you want the latter change. Also o->detect_rename should be just a simple boolean and it is better not to link its value with DIFF_ANYTHING symbol.

Previous: Felipe Gonçalves Assis
Message 2 of 2 in “merge-recursive: option to disable renames”
  1. merge-recursive: option to disable renamesFelipe Gonçalves Assis, Feb 16, 2016
  2. Junio C HamanoFeb 17, 2016

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.