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

Re: [PATCH 1/2] [RFC] Use --find- instead of --detect- as prefix for long forms of -M and -C.

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 30, 2010, 00:37 UTC
Message-ID
<7vfwujy7co.fsf@alter.siamese.dyndns.org>
In-Reply-To
<34E173EF-658B-49CC-99C4-C455074D4A05@sb.org>
Kevin Ballard <kevin@sb.org> writes:
Show 6 quoted lines
>> So I think using the same verb would make sense, either by introducing a
>> new synonym "detect-copies-harder", or by giving longer "find-copies" and
>> "find-renames" options to not-so-hard ones.
>
> Given my druthers, I'd prefer to go with --detect-copies-harder, but at this
> point I don't have as much of a strong preference anymore.

The patch is smaller, and we often say "rename detection", not "rename finding", so it may probably make more sense.

Thanks.
Show 39 quoted lines
> -Kevin Ballard
>
> -- 8< --
> Subject: [PATCH] diff: add --detect-copies-harder as a synonym for --find-copies-harder
>
>
> Signed-off-by: Kevin Ballard <kevin@sb.org>
> ---
>  Documentation/diff-options.txt |    1 +
>  diff.c                         |    2 +-
>  2 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
> index f3e9538..7246e10 100644
> --- a/Documentation/diff-options.txt
> +++ b/Documentation/diff-options.txt
> @@ -251,6 +251,7 @@ endif::git-log[]
>  	If `n` is specified, it has the same meaning as for `-M<n>`.
>  
>  --find-copies-harder::
> +--detect-copies-harder::
>  	For performance reasons, by default, `-C` option finds copies only
>  	if the original file of the copy was modified in the same
>  	changeset.  This flag makes the command
> diff --git a/diff.c b/diff.c
> index 6991ed4..faa8dc0 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -3198,7 +3198,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
>  		DIFF_OPT_SET(options, TEXT);
>  	else if (!strcmp(arg, "-R"))
>  		DIFF_OPT_SET(options, REVERSE_DIFF);
> -	else if (!strcmp(arg, "--find-copies-harder"))
> +	else if (!strcmp(arg, "--find-copies-harder") || !strcmp(arg, "--detect-copies-harder"))
>  		DIFF_OPT_SET(options, FIND_COPIES_HARDER);
>  	else if (!strcmp(arg, "--follow"))
>  		DIFF_OPT_SET(options, FOLLOW_RENAMES);
> -- 
> 1.7.3.2.615.g83f72.dirty
Previous: Kevin BallardNext: Yann Dirson
Message 12 of 17 in “rationalize diffcore-rename options and their doc”
  1. rationalize diffcore-rename options and their docYann Dirson, Nov 10, 2010
  2. 1/2 [RFC] Use --find- instead of --detect- as prefix for long forms of -M and -C.Yann Dirson, Nov 10, 2010
  3. Thomas RastNov 11, 2010
  4. Yann DirsonNov 11, 2010
  5. Thomas RastNov 11, 2010
  6. Yann DirsonNov 12, 2010
  7. Kevin BallardNov 12, 2010
  8. Miles BaderNov 12, 2010
  9. Yann DirsonNov 12, 2010
  10. Junio C HamanoNov 29, 2010
  11. Kevin BallardNov 29, 2010
  12. Junio C HamanoNov 30, 2010
  13. Yann DirsonNov 30, 2010
  14. Yann DirsonNov 29, 2010
  15. Junio C HamanoNov 29, 2010
  16. 2/2 Keep together options controlling the behaviour of diffcore-rename.Yann Dirson, Nov 10, 2010
  17. Junio C HamanoNov 16, 2010

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.