summaryrefslogtreecommitdiff
path: root/builtin/shortlog.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-05-21 04:02:20 -0700
committerJunio C Hamano <gitster@pobox.com>2010-05-21 04:02:20 -0700
commit8e3bc1456efdd4cc875d194e4fbdad07b325354b (patch)
treed1482e27793cde2a9cacc88dc3421d5e0530215f /builtin/shortlog.c
parentf9a518e884b62a76dde3b30aa5d0ac22381f47a8 (diff)
parentc197702156e2164074327f5e870ab0d3021977fc (diff)
downloadgit-8e3bc1456efdd4cc875d194e4fbdad07b325354b.tar.gz
Merge branch 'jn/shortlog'
* jn/shortlog: pretty: Respect --abbrev option shortlog: Document and test --format option t4201 (shortlog): Test output format with multiple authors t4201 (shortlog): guard setup with test_expect_success Documentation/shortlog: scripted users should not rely on implicit HEAD
Diffstat (limited to 'builtin/shortlog.c')
-rw-r--r--builtin/shortlog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 06320f5285..5089502800 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -162,7 +162,7 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit)
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;
@@ -290,6 +290,7 @@ parse_done:
}
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))