Re: [PATCH 1/2] merge: Make '--log' an integer option for number of shortlog entries

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

 



Junio C Hamano wrote:

> Hmm, do we plan on that?  It sounds a little bit insane.

I sent an RFC patch with -1 as internal representation for "git grep
-Cinfinity".  Infinity was the length Yaroslav was most interested in
for merge.log (not sure why, really).

Regardless, it's true that that would probably not be a detail to
expose.

> How about doing this on top?
[...]
> --- a/builtin/fmt-merge-msg.c
> +++ b/builtin/fmt-merge-msg.c
> @@ -322,7 +322,7 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
>  	const char *message = NULL;
>  	struct option options[] = {
>  		{ OPTION_INTEGER, 0, "log", &shortlog_len, "n",
> -		  "populate log with <n> entries from shortlog",
> +		  "populate log with at most <n> entries from shortlog",
>  		  PARSE_OPT_OPTARG, NULL, DEFAULT_MERGE_LOG_LEN },
>  		{ OPTION_INTEGER, 0, "summary", &shortlog_len, "n",
>  		  "alias for --log (deprecated)",
> @@ -350,7 +350,7 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
>  		return 0;
>  	}
>  	if (shortlog_len < 0)
> -		shortlog_len = DEFAULT_MERGE_LOG_LEN;
> +		die("Negative --log=%d???", shortlog_len);

Looks good to me (modulo punctuation :)).
--
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]