{"thread":{"id":"61950","subject":"Git exclude patterns with full static file, without globs, fails to capture the exclusion (the file is added anyway","startedAt":"2024-08-14T13:26:22Z","lastAt":"2024-08-14T13:26:22Z","messageCount":1,"participants":["Alex Recuenco"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"500909","messageId":"0A12CB85-646B-446B-855A-C6AC54A65678@esave.es","threadId":"61950","inReplyTo":null,"subject":"Git exclude patterns with full static file, without globs, fails to capture the exclusion (the file is added anyway","fromName":"Alex Recuenco","fromEmail":"alex.recuenco@esave.es","sentAt":"2024-08-14T13:26:05Z","receivedAt":"2024-08-14T13:26:22Z","isPatch":false,"sender":{"key":"alex.recuenco@esave.es","avatar":null},"body":"Good afternoon,\n\nThis was very confusing to track down, I can't find any documentation that showcases this as intended behaviour.\n\nI reviewed the pathspec docs quite a few times.\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\nI executed \n\n`git add -A ':(exclude,glob)lib/power.rb'`\n\nWhat did you expect to happen? (Expected behavior)\nThe file `lib/power.rb` is excluded\n\nWhat happened instead? (Actual behavior)\nThe file `lib/power.rb` is added to staging\nHowever, if I run\n`git add -A ':(exclude,glob)lib/power\\.rb'`\n\nThe file is excluded correctly\n\nWhat's different between what you expected and what actually happened?\n\nAnything else you want to add:\n\nIf I use \n`git add -A ':(exclude,glob)lib/*ower.rb'` the file is also excluded correctly, which makes this even more confusing\n\n\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.45.1\ncpu: arm64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:19:05 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8112 arm64\ncompiler info: clang: 15.0.0 (clang-1500.3.9.4)\nlibc info: no libc information available\n$SHELL (typically, interactive shell): /bin/zsh\n\n\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\nI executed git add -A ':(exclude,glob)lib/power.rb'\n\nWhat did you expect to happen? (Expected behavior)\nThe file lib/power.rb is excluded\n\nWhat happened instead? (Actual behavior)\nThe file lib/power.rb is added to staging\nHowever, if I run\ngit add -A ':(exclude,glob)lib/power\\.rb'\n\nThe file is excluded correctly\n\nWhat's different between what you expected and what actually happened?\n\nAnything else you want to add:\n\nIf I use \ngit add -A ':(exclude,glob)lib/*ower.rb' the file is also excluded correctly, which makes this even more confusing\n\n\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.45.1\ncpu: arm64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:19:05 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8112 arm64\ncompiler info: clang: 15.0.0 (clang-1500.3.9.4)\nlibc info: no libc information available\n$SHELL (typically, interactive shell): /bin/zsh\n\n\n"}]}