summaryrefslogtreecommitdiff
path: root/trailer.h
diff options
context:
space:
mode:
authorYang Zhao <yang.zhao@skyboxlabs.com>2019-12-13 23:52:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-01-15 20:53:40 (GMT)
commitd38208a297e76bbfbfa8e485632c217aaafa9486 (patch)
tree4f53244e4919935f4a03b951e879162a0f86ba57 /trailer.h
parent86dca24b7be6491fb8d4b7a499ccf4a43776d1ab (diff)
downloadgit-d38208a297e76bbfbfa8e485632c217aaafa9486.zip
git-d38208a297e76bbfbfa8e485632c217aaafa9486.tar.gz
git-d38208a297e76bbfbfa8e485632c217aaafa9486.tar.bz2
git-p4: convert path to unicode before processing them
P4 allows essentially arbitrary encoding for path data while we would perfer to be dealing only with unicode strings. Since path data need to survive round-trip back to p4, this patch implements the general policy that we store path data as-is, but decode them to unicode before doing any non-trivial processing. A new `decode_path()` method is provided that generally does the correct conversion, taking into account `git-p4.pathEncoding` configuration. For python2.7, path strings will be left as-is if it only contains ASCII characters. For python3, decoding is always done so that we have str objects. 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>
Diffstat (limited to 'trailer.h')
0 files changed, 0 insertions, 0 deletions