History

use the same BOM bytes as in git-attributes (#331)

That way, it's more easily discoverable should people search for it.

Sebastian Thiel committed 4 years ago

Commit 72047551 parent 2d5768d1 file · +6 −3Browse files

Unified · Split

git-config/src/parser.rs+6−3
@@ -1920,15 +1920,18 @@ mod parse { · 1919 unmodified lines
19201920 [core]
19211921 a = 1
19221922 ";
1923− let bytes_with_gb18030_bom = b"\x84\x31\x95\x33
1923+ let bytes_with_gb18030_bom = "\u{feff}
19241924 [core]
19251925 a = 1
19261926 ";
19271927
1928− assert_eq!(parse_from_bytes(bytes), parse_from_bytes(bytes_with_gb18030_bom));
1928+ assert_eq!(
1929+ parse_from_bytes(bytes),
1930+ parse_from_bytes(bytes_with_gb18030_bom.as_bytes())
1931+ );
19291932 assert_eq!(
19301933 parse_from_bytes_owned(bytes),
1931− parse_from_bytes_owned(bytes_with_gb18030_bom)
1934+ parse_from_bytes_owned(bytes_with_gb18030_bom.as_bytes())
19321935 );
19331936 }
19341937 }