From: Jonathan Nieder Date: Tue, 31 Aug 2010 18:21:20 GMT Subject: Re: [PATCH 1/2] merge: Make '--log' an integer option for number of shortlog entries Message-ID: <20100831182120.GR2315@burratino> In-Reply-To: <7vzkw2abpz.fsf@alter.siamese.dyndns.org> 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 entries from shortlog", > + "populate log with at most 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 :)).