summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2007-03-28 17:09:05 -0400
committerJunio C Hamano <junkio@cox.net>2007-03-28 14:27:43 -0700
commit6a5ea2d023906a6e8feea42afa45536db6fd493f (patch)
treec393794682044697c10f527e95991bb9da096cd8 /commit.c
parent542e165cdc4fbebbfe7c8954ca1aa1d4162e38cb (diff)
downloadgit-6a5ea2d023906a6e8feea42afa45536db6fd493f.tar.gz
Fix "--pretty=format:" encoding item
It printed the header "encoding " instead of just showing the encoding, as all other items do. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/commit.c b/commit.c
index 9ac533c85a..a4f2e74c0b 100644
--- a/commit.c
+++ b/commit.c
@@ -888,7 +888,8 @@ static long format_commit_message(const struct commit *commit,
fill_person(table + ICOMMITTER_NAME,
msg + i + 10, eol - i - 10);
else if (!prefixcmp(msg + i, "encoding "))
- table[IENCODING].value = xstrndup(msg + i, eol - i);
+ table[IENCODING].value =
+ xstrndup(msg + i + 9, eol - i - 9);
i = eol;
}
if (msg[i])