X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-shortlog.c;h=4d4a3c82d6209ce3ec897dad0c69d58a329b4303;hb=46e09f310567b680c03151e048bf2b7e847611e2;hp=badd9120388569c79b137f679505b495cc1dbbe9;hpb=891182f9141326fd6833d3651b89860a0b41f153;p=git.git diff --git a/builtin-shortlog.c b/builtin-shortlog.c index badd91203..4d4a3c82d 100644 --- a/builtin-shortlog.c +++ b/builtin-shortlog.c @@ -56,7 +56,7 @@ static void insert_one_record(struct shortlog *log, /* copy author name to namebuf, to support matching on both name and email */ memcpy(namebuf, author, boemail - author); len = boemail - author; - while(len > 0 && isspace(namebuf[len-1])) + while (len > 0 && isspace(namebuf[len-1])) len--; namebuf[len] = 0; @@ -101,7 +101,6 @@ static void insert_one_record(struct shortlog *log, } while (*oneline && isspace(*oneline) && *oneline != '\n') oneline++; - len = eol - oneline; format_subject(&subject, oneline, " "); buffer = strbuf_detach(&subject, NULL); @@ -264,7 +263,7 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix) git_config(git_default_config, NULL); shortlog_init(&log); init_revisions(&rev, prefix); - parse_options_start(&ctx, argc, argv, PARSE_OPT_KEEP_DASHDASH | + parse_options_start(&ctx, argc, argv, prefix, PARSE_OPT_KEEP_DASHDASH | PARSE_OPT_KEEP_ARGV0); for (;;) {