{"thread":{"id":"66925","subject":"[PATCH] t1501: don't reassign EMPTY_BLOB and EMPTY_TREE","startedAt":"2026-11-24T09:15:49Z","lastAt":"2026-11-25T11:39:50Z","messageCount":4,"participants":["René Scharfe","Ben Knoble","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"559218","messageId":"0e64c973-4ad1-4eaa-938e-f9d60418562a@web.de","threadId":"66925","inReplyTo":null,"subject":"[PATCH] t1501: don't reassign EMPTY_BLOB and EMPTY_TREE","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2026-11-24T09:15:49Z","receivedAt":"2026-11-24T09:15:49Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"The variables EMPTY_BLOB AND EMPTY_TREE are already set by test-lib.sh,\nso just use them.\n\nSigned-off-by: René Scharfe <l.s.r@web.de>\n---\n t/t1501-work-tree.sh | 2 --\n 1 file changed, 2 deletions(-)\n\ndiff --git a/t/t1501-work-tree.sh b/t/t1501-work-tree.sh\nindex 8c94ac2e70..e6f43b0fb8 100755\n--- a/t/t1501-work-tree.sh\n+++ b/t/t1501-work-tree.sh\n@@ -5,8 +5,6 @@ test_description='test separate work tree'\n . ./test-lib.sh\n \n test_expect_success 'setup' '\n-\tEMPTY_TREE=$(git write-tree) &&\n-\tEMPTY_BLOB=$(git hash-object -t blob --stdin </dev/null) &&\n \tCHANGED_BLOB=$(echo changed | git hash-object -t blob --stdin) &&\n \tEMPTY_BLOB7=$(echo $EMPTY_BLOB | sed \"s/\\(.......\\).*/\\1/\") &&\n \tCHANGED_BLOB7=$(echo $CHANGED_BLOB | sed \"s/\\(.......\\).*/\\1/\") &&\n-- \n2.56.1\n\n"},{"id":"559225","messageId":"EFAA4505-5C65-4DF2-984C-C3DC07A44124@gmail.com","threadId":"66925","inReplyTo":"0e64c973-4ad1-4eaa-938e-f9d60418562a@web.de","subject":"Re: [PATCH] t1501: don't reassign EMPTY_BLOB and EMPTY_TREE","fromName":"Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2026-11-24T12:51:04Z","receivedAt":"2026-11-24T12:51:04Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"\n> Le 24 nov. 2026 à 04:16, René Scharfe <l.s.r@web.de> a écrit :\n> \n> ﻿The variables EMPTY_BLOB AND EMPTY_TREE are already set by test-lib.sh,\n> so just use them.\n\nNit: downcase and?\n\n> \n> Signed-off-by: René Scharfe <l.s.r@web.de>\n> ---\n> t/t1501-work-tree.sh | 2 --\n> 1 file changed, 2 deletions(-)\n> \n> diff --git a/t/t1501-work-tree.sh b/t/t1501-work-tree.sh\n> index 8c94ac2e70..e6f43b0fb8 100755\n> --- a/t/t1501-work-tree.sh\n> +++ b/t/t1501-work-tree.sh\n> @@ -5,8 +5,6 @@ test_description='test separate work tree'\n> . ./test-lib.sh\n> \n> test_expect_success 'setup' '\n> -    EMPTY_TREE=$(git write-tree) &&\n> -    EMPTY_BLOB=$(git hash-object -t blob --stdin </dev/null) &&\n>    CHANGED_BLOB=$(echo changed | git hash-object -t blob --stdin) &&\n>    EMPTY_BLOB7=$(echo $EMPTY_BLOB | sed \"s/\\(.......\\).*/\\1/\") &&\n>    CHANGED_BLOB7=$(echo $CHANGED_BLOB | sed \"s/\\(.......\\).*/\\1/\") &&\n> --\n> 2.56.1\n\nNice simplification. A future reader may wonder what sets those,\nbut git-grep turns them up.\n"},{"id":"559266","messageId":"xmqqcxruotwa.fsf@gitster.g","threadId":"66925","inReplyTo":"0e64c973-4ad1-4eaa-938e-f9d60418562a@web.de","subject":"Re: [PATCH] t1501: don't reassign EMPTY_BLOB and EMPTY_TREE","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-11-24T20:29:25Z","receivedAt":"2026-11-24T20:29:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"René Scharfe <l.s.r@web.de> writes:\n\n> The variables EMPTY_BLOB AND EMPTY_TREE are already set by test-lib.sh,\n> so just use them.\n>\n> Signed-off-by: René Scharfe <l.s.r@web.de>\n> ---\n>  t/t1501-work-tree.sh | 2 --\n>  1 file changed, 2 deletions(-)\n\nNice spotting.  Even though the version in test-lib.sh has a certain\n\"Yuck\" factor by relying on hardcoded values in oid-info/hash-info file,\nwe already rely on them everywhere, so there is no good excuse not to\nuse them.\n\nWill queue.  Thanks.\n\n> diff --git a/t/t1501-work-tree.sh b/t/t1501-work-tree.sh\n> index 8c94ac2e70..e6f43b0fb8 100755\n> --- a/t/t1501-work-tree.sh\n> +++ b/t/t1501-work-tree.sh\n> @@ -5,8 +5,6 @@ test_description='test separate work tree'\n>  . ./test-lib.sh\n>  \n>  test_expect_success 'setup' '\n> -\tEMPTY_TREE=$(git write-tree) &&\n> -\tEMPTY_BLOB=$(git hash-object -t blob --stdin </dev/null) &&\n>  \tCHANGED_BLOB=$(echo changed | git hash-object -t blob --stdin) &&\n>  \tEMPTY_BLOB7=$(echo $EMPTY_BLOB | sed \"s/\\(.......\\).*/\\1/\") &&\n>  \tCHANGED_BLOB7=$(echo $CHANGED_BLOB | sed \"s/\\(.......\\).*/\\1/\") &&\n\n"},{"id":"559332","messageId":"0565aa25-cbd5-415a-a8bc-ddf5f217eb6f@web.de","threadId":"66925","inReplyTo":"EFAA4505-5C65-4DF2-984C-C3DC07A44124@gmail.com","subject":"Re: [PATCH] t1501: don't reassign EMPTY_BLOB and EMPTY_TREE","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2026-11-25T11:39:50Z","receivedAt":"2026-11-25T11:39:50Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"On 11/24/26 1:51 PM, Ben Knoble wrote:\n> \n>> Le 24 nov. 2026 à 04:16, René Scharfe <l.s.r@web.de> a écrit :\n>>\n>> ﻿The variables EMPTY_BLOB AND EMPTY_TREE are already set by test-lib.sh,\n>> so just use them.\n> \n> Nit: downcase and?\nRight, no need to shout the conjunction..\n\nRené\n\n\n"}]}