diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 06320f5285988365b8340e110427866e68536b47..0a9681ba7ece52e751b1b54d53f3e8fb4c19464e 100644 (file)
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
snprintf(namebuf + len, room, " <%.*s>", maillen, emailbuf);
}
snprintf(namebuf + len, room, " <%.*s>", maillen, emailbuf);
}
- item = string_list_insert(namebuf, &log->list);
+ item = string_list_insert(&log->list, namebuf);
if (item->util == NULL)
item->util = xcalloc(1, sizeof(struct string_list));
if (item->util == NULL)
item->util = xcalloc(1, sizeof(struct string_list));
}
}
}
}
- string_list_append(buffer, item->util);
+ string_list_append(item->util, buffer);
}
static void read_from_stdin(struct shortlog *log)
}
static void read_from_stdin(struct shortlog *log)
sha1_to_hex(commit->object.sha1));
if (log->user_format) {
struct pretty_print_context ctx = {0};
sha1_to_hex(commit->object.sha1));
if (log->user_format) {
struct pretty_print_context ctx = {0};
- ctx.abbrev = DEFAULT_ABBREV;
+ ctx.abbrev = log->abbrev;
ctx.subject = "";
ctx.after_subject = "";
ctx.date_mode = DATE_NORMAL;
ctx.subject = "";
ctx.after_subject = "";
ctx.date_mode = DATE_NORMAL;
}
log.user_format = rev.commit_format == CMIT_FMT_USERFORMAT;
}
log.user_format = rev.commit_format == CMIT_FMT_USERFORMAT;
+ log.abbrev = rev.abbrev;
/* assume HEAD if from a tty */
if (!nongit && !rev.pending.nr && isatty(0))
/* assume HEAD if from a tty */
if (!nongit && !rev.pending.nr && isatty(0))