git-p4: fix git-p4.pathEncoding for removed files
commita8b05162e894b88aeb7d5064daba07e1a4f58463
authorLars Schneider <larsxschneider@gmail.com>
Thu, 9 Feb 2017 15:06:56 +0000 (9 16:06 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Feb 2017 22:33:13 +0000 (10 14:33 -0800)
tree138b28f52415d7eca09b72b1e51897270e8c8304
parent50b4a7807f5f1db79a0a4f4400c29bc00efbd307
git-p4: fix git-p4.pathEncoding for removed files

In a9e38359e3 we taught git-p4 a way to re-encode path names from what
was used in Perforce to UTF-8. This path re-encoding worked properly for
"added" paths. "Removed" paths were not re-encoded and therefore
different from the "added" paths. Consequently, these files were not
removed in a git-p4 cloned Git repository because the path names did not
match.

Fix this by moving the re-encoding to a place that affects "added" and
"removed" paths. Add a test to demonstrate the issue.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Reviewed-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-p4.py
t/t9822-git-p4-path-encoding.sh