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
1920 [core]1920 [core]
1921 a = 11921 a = 1
1922 ";1922 ";
1923 let bytes_with_gb18030_bom = b"\x84\x31\x95\x331923 let bytes_with_gb18030_bom = "\u{feff}
1924 [core]1924 [core]
1925 a = 11925 a = 1
1926 ";1926 ";
1927 1927
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 );
1929 assert_eq!(1932 assert_eq!(
1930 parse_from_bytes_owned(bytes),1933 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())
1932 );1935 );
1933 }1936 }
1934}1937}