SQUASH???

This commit is contained in:
Junio C Hamano
2023-11-16 15:15:18 +09:00
parent d3ffb483c2
commit 028cc086d3
4 changed files with 10 additions and 7 deletions

View File

@ -108,7 +108,7 @@ user defined attributes under this namespace will be ignored and
trigger a warning. trigger a warning.
`builtin_objectmode` `builtin_objectmode`
^^^^^^^^^^^^^^^^^^^^ ~~~~~~~~~~~~~~~~~~~~
This attribute is for filtering files by their file bit modes (40000, This attribute is for filtering files by their file bit modes (40000,
120000, 160000, 100755, 100644). e.g. ':(attr:builtin_objectmode=160000)'. 120000, 160000, 100755, 100644). e.g. ':(attr:builtin_objectmode=160000)'.
You may also check these values with `git check-attr builtin_objectmode -- <file>`. You may also check these values with `git check-attr builtin_objectmode -- <file>`.

0
neue Normal file
View File

View File

@ -580,12 +580,13 @@ test_expect_success 'builtin object mode attributes work (dir and regular paths)
' '
test_expect_success POSIXPERM 'builtin object mode attributes work (executable)' ' test_expect_success POSIXPERM 'builtin object mode attributes work (executable)' '
>exec && chmod +x exec && >exec &&
chmod +x exec &&
attr_check_object_mode exec 100755 attr_check_object_mode exec 100755
' '
test_expect_success SYMLINKS 'builtin object mode attributes work (symlinks)' ' test_expect_success SYMLINKS 'builtin object mode attributes work (symlinks)' '
>to_sym ln -s to_sym sym && ln -s to_sym sym &&
attr_check_object_mode sym 120000 attr_check_object_mode sym 120000
' '

View File

@ -295,22 +295,24 @@ test_expect_success 'reading from .gitattributes in a subdirectory (3)' '
test_cmp expect actual test_cmp expect actual
' '
test_expect_success 'pathspec with builtin_objectmode attr can be used' ' test_expect_success POSIXPERM 'pathspec with builtin_objectmode attr can be used' '
>mode_exec_file_1 && >mode_exec_file_1 &&
git status -s ":(attr:builtin_objectmode=100644)mode_exec_*" >actual && git status -s ":(attr:builtin_objectmode=100644)mode_exec_*" >actual &&
echo ?? mode_exec_file_1 >expect && echo ?? mode_exec_file_1 >expect &&
test_cmp expect actual && test_cmp expect actual &&
git add mode_exec_file_1 && chmod +x mode_exec_file_1 && git add mode_exec_file_1 &&
chmod +x mode_exec_file_1 &&
git status -s ":(attr:builtin_objectmode=100755)mode_exec_*" >actual && git status -s ":(attr:builtin_objectmode=100755)mode_exec_*" >actual &&
echo AM mode_exec_file_1 >expect && echo AM mode_exec_file_1 >expect &&
test_cmp expect actual test_cmp expect actual
' '
test_expect_success 'builtin_objectmode attr can be excluded' ' test_expect_success POSIXPERM 'builtin_objectmode attr can be excluded' '
>mode_1_regular && >mode_1_regular &&
>mode_1_exec && chmod +x mode_1_exec && >mode_1_exec &&
chmod +x mode_1_exec &&
git status -s ":(exclude,attr:builtin_objectmode=100644)" "mode_1_*" >actual && git status -s ":(exclude,attr:builtin_objectmode=100644)" "mode_1_*" >actual &&
echo ?? mode_1_exec >expect && echo ?? mode_1_exec >expect &&
test_cmp expect actual && test_cmp expect actual &&