diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-05-21 04:02:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-21 04:02:20 -0700 |
commit | 8e3bc1456efdd4cc875d194e4fbdad07b325354b (patch) | |
tree | d1482e27793cde2a9cacc88dc3421d5e0530215f /pretty.c | |
parent | f9a518e884b62a76dde3b30aa5d0ac22381f47a8 (diff) | |
parent | c197702156e2164074327f5e870ab0d3021977fc (diff) | |
download | git-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 'pretty.c')
-rw-r--r-- | pretty.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -716,7 +716,7 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder, if (add_again(sb, &c->abbrev_commit_hash)) return 1; strbuf_addstr(sb, find_unique_abbrev(commit->object.sha1, - DEFAULT_ABBREV)); + c->pretty_ctx->abbrev)); c->abbrev_commit_hash.len = sb->len - c->abbrev_commit_hash.off; return 1; case 'T': /* tree hash */ @@ -726,7 +726,7 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder, if (add_again(sb, &c->abbrev_tree_hash)) return 1; strbuf_addstr(sb, find_unique_abbrev(commit->tree->object.sha1, - DEFAULT_ABBREV)); + c->pretty_ctx->abbrev)); c->abbrev_tree_hash.len = sb->len - c->abbrev_tree_hash.off; return 1; case 'P': /* parent hashes */ @@ -743,7 +743,8 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder, if (p != commit->parents) strbuf_addch(sb, ' '); strbuf_addstr(sb, find_unique_abbrev( - p->item->object.sha1, DEFAULT_ABBREV)); + p->item->object.sha1, + c->pretty_ctx->abbrev)); } c->abbrev_parent_hashes.len = sb->len - c->abbrev_parent_hashes.off; |