summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-05-21 11:02:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-05-21 11:02:20 (GMT)
commit8e3bc1456efdd4cc875d194e4fbdad07b325354b (patch)
treed1482e27793cde2a9cacc88dc3421d5e0530215f /pretty.c
parentf9a518e884b62a76dde3b30aa5d0ac22381f47a8 (diff)
parentc197702156e2164074327f5e870ab0d3021977fc (diff)
downloadgit-8e3bc1456efdd4cc875d194e4fbdad07b325354b.zip
git-8e3bc1456efdd4cc875d194e4fbdad07b325354b.tar.gz
git-8e3bc1456efdd4cc875d194e4fbdad07b325354b.tar.bz2
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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pretty.c b/pretty.c
index 742b48b..74cda1b 100644
--- a/pretty.c
+++ b/pretty.c
@@ -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;