{"thread":{"id":"62664","subject":"[PATCH] pathsec: make check for PATHSPEC_LITERAL more readable","startedAt":"2024-12-18T03:53:15Z","lastAt":"2024-12-18T04:43:51Z","messageCount":2,"participants":["AreaZR via GitGitGadget","Kristoffer Haugsbakk"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"509273","messageId":"pull.1453.git.git.1734493992236.gitgitgadget@gmail.com","threadId":"62664","inReplyTo":null,"subject":"[PATCH] pathsec: make check for PATHSPEC_LITERAL more readable","fromName":"AreaZR via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-12-18T03:53:12Z","receivedAt":"2024-12-18T03:53:15Z","isPatch":true,"sender":{"key":"name:AreaZR","avatar":null},"body":"From: Seija Kijin <doremylover123@gmail.com>\n\nThis check is designed to die if global_magic\nhas the PATHSPEC_LITERAL and any other setting.\n\nThis can be written is a much more obvious way:\nif global_magic has PATHSPEC_LITERAL, it can only\nBE PATHSPEC_LITERAL, and if it isn't then there are\nother settings.\n\nSigned-off-by: Seija Kijin <doremylover123@gmail.com>\n---\n    pathsec: make check for PATHSPEC_LITERAL more readable\n    \n    This check is designed to die if global_magic has the PATHSPEC_LITERAL\n    and any other setting.\n    \n    This can be written is a much more obvious way: if global_magic has\n    PATHSPEC_LITERAL, it can only BE PATHSPEC_LITERAL, and if it isn't then\n    there are other settings.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1453%2FAreaZR%2Fredundant-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1453/AreaZR/redundant-v1\nPull-Request: https://github.com/git/git/pull/1453\n\n pathspec.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/pathspec.c b/pathspec.c\nindex 0fc6f84a6e6..0af953d055d 100644\n--- a/pathspec.c\n+++ b/pathspec.c\n@@ -313,7 +313,7 @@ static int get_global_magic(int element_magic)\n \t\tglobal_magic |= PATHSPEC_ICASE;\n \n \tif ((global_magic & PATHSPEC_LITERAL) &&\n-\t    (global_magic & ~PATHSPEC_LITERAL))\n+\t    (global_magic != PATHSPEC_LITERAL))\n \t\tdie(_(\"global 'literal' pathspec setting is incompatible \"\n \t\t      \"with all other global pathspec settings\"));\n \n\nbase-commit: d882f382b3d939d90cfa58d17b17802338f05d66\n-- \ngitgitgadget\n"},{"id":"509274","messageId":"56a77219-d60b-45bc-ad6b-1225e9ee313c@app.fastmail.com","threadId":"62664","inReplyTo":"pull.1453.git.git.1734493992236.gitgitgadget@gmail.com","subject":"Re: [PATCH] pathsec: make check for PATHSPEC_LITERAL more readable","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-12-18T04:43:25Z","receivedAt":"2024-12-18T04:43:51Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"Commit subject area: s/pathsec/pathspec/\n"}]}