git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Arjen Laarhoven <arjen@yaph.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] git-log: Follow file copies with 'git log --follow -C -C'
Date: Thu, 22 Jan 2009 09:28:59 -0800	[thread overview]
Message-ID: <7v8wp36yhw.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1232642245-94405-2-git-send-email-arjen@yaph.org> (Arjen Laarhoven's message of "Thu, 22 Jan 2009 17:37:25 +0100")

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?

> 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

      reply	other threads:[~2009-01-22 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-22 16:37 [PATCH 1/2] t/t4202-log.sh: Add testcases Arjen Laarhoven
2009-01-22 16:37 ` [PATCH 2/2] git-log: Follow file copies with 'git log --follow -C -C' Arjen Laarhoven
2009-01-22 17:28   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v8wp36yhw.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=arjen@yaph.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).