]> git.ipfire.org Git - thirdparty/git.git/commit - git-p4.py
git-p4: encode/decode communication with git for python3
authorYang Zhao <yang.zhao@skyboxlabs.com>
Fri, 13 Dec 2019 23:52:39 +0000 (15:52 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jan 2020 20:53:40 +0000 (12:53 -0800)
commit86dca24b7be6491fb8d4b7a499ccf4a43776d1ab
tree37f161aa603804d3c0d0e88947eb69aee72cbdf3
parent6cec21a82f437184c69cce2b8fe6011d02acfa06
git-p4: encode/decode communication with git for python3

Under python3, calls to write() on the stream to `git fast-import` must
be encoded.  This patch wraps the IO object such that this encoding is
done transparently.

Conversely, any text data read from subprocesses must also be decoded
before running through the rest of the pipeline.

Signed-off-by: Yang Zhao <yang.zhao@skyboxlabs.com>
Reviewed-by: Ben Keene <seraphire@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-p4.py