Re: [PATCH] log: add log.follow config option

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

 



David Turner <dturner@xxxxxxxxxxxxxxxx> writes:

> diff --git a/builtin/log.c b/builtin/log.c
> index 8781049..11b8d82 100644
> --- a/builtin/log.c
> +++ b/builtin/log.c
> @@ -31,6 +31,7 @@ static const char *default_date_mode = NULL;
>  
>  static int default_abbrev_commit;
>  static int default_show_root = 1;
> +static int default_follow = 0;
>  static int decoration_style;
>  static int decoration_given;
>  static int use_mailmap_config;
> @@ -102,6 +103,8 @@ static void cmd_log_init_defaults(struct rev_info *rev)
>  {
>  	if (fmt_pretty)
>  		get_commit_format(fmt_pretty, rev);
> +	if (default_follow)
> +		DIFF_OPT_SET(&rev->diffopt, FOLLOW_RENAMES);

Doesn't it activate --follow all the time, including when the user
provides several paths?

In this case, you get this:

$ git log --follow *.c
fatal: --follow requires exactly one pathspec

So activating --follow for all "git log" calls would prevent log from
being used with several pathspecs.

Or, do you have a preparation patch that allows --follow with multiple
pathspecs? ;-)

In any case, you have to test "git log -- path1 path2" with the option
activated.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]