diff options
author | Vincent Driessen <me@nvie.com> | 2016-05-30 15:26:23 +0200 |
---|---|---|
committer | Vincent Driessen <me@nvie.com> | 2016-05-30 15:44:46 +0200 |
commit | 1faf84f8eb760b003ad2be81432443bf443b82e6 (patch) | |
tree | e3bde34d58698fb4ae3c2bf1e45830dccd8e724e /git/test/fixtures/diff_patch_unsafe_paths | |
parent | e836e5cdcc7e3148c388fe8c4a1bab7eeb00cc3f (diff) | |
download | gitpython-1faf84f8eb760b003ad2be81432443bf443b82e6.tar.gz |
Fix bug in diff parser outputfix-octal-escaped-path-parser-bug
The diff --patch parser was missing some edge case where Git would
encode non-ASCII chars in path names as octals, but these weren't
decoded properly.
\360\237\222\251.txt
Decoded via utf-8, that will return:
💩.txt
Diffstat (limited to 'git/test/fixtures/diff_patch_unsafe_paths')
-rw-r--r-- | git/test/fixtures/diff_patch_unsafe_paths | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/git/test/fixtures/diff_patch_unsafe_paths b/git/test/fixtures/diff_patch_unsafe_paths index 14375f79..9ee6b834 100644 --- a/git/test/fixtures/diff_patch_unsafe_paths +++ b/git/test/fixtures/diff_patch_unsafe_paths @@ -61,6 +61,13 @@ index 0000000000000000000000000000000000000000..eaf5f7510320b6a327fb308379de2f94 +++ "b/path/¯\\_(ツ)_|¯" @@ -0,0 +1 @@ +dummy content +diff --git "a/path/\360\237\222\251.txt" "b/path/\360\237\222\251.txt" +new file mode 100644 +index 0000000000000000000000000000000000000000..eaf5f7510320b6a327fb308379de2f94d8859a54 +--- /dev/null ++++ "b/path/\360\237\222\251.txt" +@@ -0,0 +1 @@ ++dummy content diff --git a/a/with spaces b/b/with some spaces similarity index 100% rename from a/with spaces |