summaryrefslogtreecommitdiff
path: root/t/t8006-blame-textconv.sh
diff options
context:
space:
mode:
authorSebastian Schuberth <sschuberth@gmail.com>2011-10-28 15:28:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-28 15:41:56 (GMT)
commit2564aa48ce007ad265c0d31a7cb7513239447d2b (patch)
tree087f2a1832cebc2aecba80398bb59dce90efa150 /t/t8006-blame-textconv.sh
parent900647104e02e545064789f3c6b90a5807fba07b (diff)
downloadgit-2564aa48ce007ad265c0d31a7cb7513239447d2b.zip
git-2564aa48ce007ad265c0d31a7cb7513239447d2b.tar.gz
git-2564aa48ce007ad265c0d31a7cb7513239447d2b.tar.bz2
blame.c: Properly initialize strbuf after calling, textconv_object()
For a plain string where only the length is known, strbuf.alloc needs to be initialized to the length. Otherwise strbuf.alloc is 0 and a later call to strbuf_setlen() will fail. This bug surfaced when calling git blame under Windows on a *.doc file. The *.doc file is converted to plain text by antiword via the textconv mechanism. However, the plain text returned by antiword contains DOS line endings instead of Unix line endings which triggered the strbuf_setlen() which previous to this patch failed. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t8006-blame-textconv.sh')
0 files changed, 0 insertions, 0 deletions