[PATCH] Fix "--pretty=format:" encoding item

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It printed the header "encoding " instead of just showing
the encoding, as all other items do.

This now passes t6006.

Signed-off-by: Jeff King <peff@xxxxxxxx>
---
 commit.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/commit.c b/commit.c
index 9ac533c..a4f2e74 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])
-- 
1.5.1.rc2.636.gff57
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]