{"thread":{"id":"62837","subject":"`git add` with unmatching case silently fails on case-insensitive file systems","startedAt":"2025-01-21T07:52:12Z","lastAt":"2025-01-21T17:16:35Z","messageCount":2,"participants":["Lê Duy Quang","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"510994","messageId":"7e5e2f26-deda-41a3-af46-79c42435b3c7@gmail.com","threadId":"62837","inReplyTo":null,"subject":"`git add` with unmatching case silently fails on case-insensitive file systems","fromName":"Lê Duy Quang","fromEmail":"leduyquang753@gmail.com","sentAt":"2025-01-21T07:52:09Z","receivedAt":"2025-01-21T07:52:12Z","isPatch":false,"sender":{"key":"leduyquang753@gmail.com","avatar":"https://gravatar.com/avatar/f15e7b4c0bd656dd16b43b810d31934f4775f409784afdacd5e387ac4f5fbe59?d=mp&s=160"},"body":"Good morning,\n\nI am using Git on Windows, whose file system is case-insensitive. If the \nworking tree has a file called `SourceFile.c`, for example, and I run \n`git add sourcefile.c`, I would expect either (a) Git stages \n`SourceFile.c` or (b) Git errors with \"fatal: pathspec 'sourcefile.c' \ndid not match any files\". However, none of those actually took place; \ninstead Git did not stage the file and produced no output as if the \ncommand had succeeded, which led me to proceed to committing without \nrealizing I had missed the file.\n\nI would like to know whether this is intended behavior or I have bumped \ninto a case-sensitivity bug.\n\nRegards,\nQuang\n"},{"id":"511005","messageId":"20250121171621.GA4932@tb-raspi4","threadId":"62837","inReplyTo":"7e5e2f26-deda-41a3-af46-79c42435b3c7@gmail.com","subject":"Re: `git add` with unmatching case silently fails on case-insensitive file systems","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2025-01-21T17:16:21Z","receivedAt":"2025-01-21T17:16:35Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Tue, Jan 21, 2025 at 02:52:09PM +0700, Lê Duy Quang wrote:\n> Good morning,\n>\n> I am using Git on Windows, whose file system is case-insensitive. If the\n> working tree has a file called `SourceFile.c`, for example, and I run `git\n> add sourcefile.c`, I would expect either (a) Git stages `SourceFile.c` or\n> (b) Git errors with \"fatal: pathspec 'sourcefile.c' did not match any\n> files\". However, none of those actually took place; instead Git did not\n> stage the file and produced no output as if the command had succeeded, which\n> led me to proceed to committing without realizing I had missed the file.\n>\n> I would like to know whether this is intended behavior or I have bumped into\n> a case-sensitivity bug.\n\nThe thing is that Windows tells us sourcefile.c is there,\neven if Sourcefile.c is there.\nSo that is why neither a) nor b) is happening.\n\nYou can call it a bug, or a not-yet-implemented feature.\nIn any case, just to be shure,\ngit status\nis your friend before doing the commit.\n"}]}