git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] attr: add builtin objectmode values support

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 16, 2023, 08:08 UTC
Message-ID
<xmqqil62qfvr.fsf@gitster.g>
In-Reply-To
<xmqqsf56ql14.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> Other than the removal of that file, I locally applied the following
> fix-up while checking the difference relative to the previous
> iteration.

Cumulatively, aside from the removal of the t/#t* file, here is what I ended up with so far.

Subject: [PATCH] SQUASH???
---
 Documentation/gitattributes.txt |  2 +-
 neue                            |  0
 t/t0003-attributes.sh           |  5 +++--
 t/t6135-pathspec-with-attrs.sh  | 10 ++++++----
 4 files changed, 10 insertions(+), 7 deletions(-)
 create mode 100644 neue
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 784aa9d4de..201bdf5edb 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -108,7 +108,7 @@ user defined attributes under this namespace will be ignored and
 trigger a warning.
 
 `builtin_objectmode`
-^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~
 This attribute is for filtering files by their file bit modes (40000,
 120000, 160000, 100755, 100644). e.g. ':(attr:builtin_objectmode=160000)'.
 You may also check these values with `git check-attr builtin_objectmode -- <file>`.
diff --git a/neue b/neue
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 86f8681570..774b52c298 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -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)' '
-	>exec && chmod +x exec &&
+	>exec &&
+	chmod +x exec &&
 	attr_check_object_mode exec 100755
 '
 
 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
 '
 
diff --git a/t/t6135-pathspec-with-attrs.sh b/t/t6135-pathspec-with-attrs.sh
index b08a32ea68..f6403ebbda 100755
--- a/t/t6135-pathspec-with-attrs.sh
+++ b/t/t6135-pathspec-with-attrs.sh
@@ -295,22 +295,24 @@ test_expect_success 'reading from .gitattributes in a subdirectory (3)' '
 	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 &&
 
 	git status -s ":(attr:builtin_objectmode=100644)mode_exec_*" >actual &&
 	echo ?? mode_exec_file_1 >expect &&
 	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 &&
 	echo AM mode_exec_file_1 >expect &&
 	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_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 &&
 	echo ?? mode_1_exec >expect &&
 	test_cmp expect actual &&
-- 
2.43.0-rc2
Previous: Junio C HamanoNext: Joanna Wang
Message 9 of 15 in “Re: [PATCH 1/1] attr: add native file mode values support”
  1. Joanna WangNov 14, 2023
  2. Junio C HamanoNov 14, 2023
  3. 1/1 attr: add builtin objectmode values supportJoanna Wang, Nov 14, 2023
  4. Junio C HamanoNov 16, 2023
  5. Eric SunshineNov 16, 2023
  6. Junio C HamanoNov 16, 2023
  7. 1/1 attr: add builtin objectmode values supportJoanna Wang, Nov 16, 2023
  8. Junio C HamanoNov 16, 2023
  9. Junio C HamanoNov 16, 2023
  10. Joanna WangNov 16, 2023
  11. Joanna WangDec 1, 2023
  12. Junio C HamanoDec 12, 2023
  13. Junio C HamanoDec 20, 2023
  14. Joanna WangJan 12, 2024
  15. Junio C HamanoNov 16, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.