diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-05-05 21:00:34 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-05 21:00:34 -0700 |
commit | 2e1dfd62dca9aecb0ec1bdf3d1927a8da6d95723 (patch) | |
tree | 6f556bbcfcb7fcecea0df2e1b116560a0f5569d7 /t | |
parent | Merge branch 'jc/epochtime-wo-tz' (diff) | |
parent | attr: skip UTF8 BOM at the beginning of the input file (diff) | |
download | tgif-2e1dfd62dca9aecb0ec1bdf3d1927a8da6d95723.tar.xz |
Merge branch 'cn/bom-in-gitignore'
Teach the codepaths that read .gitignore and .gitattributes files
that these files encoded in UTF-8 may have UTF-8 BOM marker at the
beginning; this makes it in line with what we do for configuration
files already.
* cn/bom-in-gitignore:
attr: skip UTF8 BOM at the beginning of the input file
config: use utf8_bom[] from utf.[ch] in git_parse_source()
utf8-bom: introduce skip_utf8_bom() helper
add_excludes_from_file: clarify the bom skipping logic
dir: allow a BOM at the beginning of exclude files
Diffstat (limited to 't')
-rwxr-xr-x | t/t7061-wtstatus-ignore.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t7061-wtstatus-ignore.sh b/t/t7061-wtstatus-ignore.sh index 460789b4d8..cdc0747bf0 100755 --- a/t/t7061-wtstatus-ignore.sh +++ b/t/t7061-wtstatus-ignore.sh @@ -20,6 +20,15 @@ test_expect_success 'status untracked directory with --ignored' ' test_cmp expected actual ' +test_expect_success 'same with gitignore starting with BOM' ' + printf "\357\273\277ignored\n" >.gitignore && + mkdir -p untracked && + : >untracked/ignored && + : >untracked/uncommitted && + git status --porcelain --ignored >actual && + test_cmp expected actual +' + cat >expected <<\EOF ?? .gitignore ?? actual |