{"thread":{"id":"41647","subject":"Bug report: can't use git add with --patch option in \"_\" directory","startedAt":"2016-03-09T15:48:28Z","lastAt":"2016-03-09T15:48:28Z","messageCount":1,"participants":["Carl Fink"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"280420","messageId":"CAHQDUVeqzKoxd=Us2KagXmcutpos737+Z6ZSiV4Z70LKrn4LcQ@mail.gmail.com","threadId":"41647","inReplyTo":null,"subject":"Bug report: can't use git add with --patch option in \"_\" directory","fromName":"Carl Fink","fromEmail":"cafink@gmail.com","sentAt":"2016-03-09T15:48:28Z","receivedAt":"2016-03-09T15:48:28Z","isPatch":false,"sender":{"key":"cafink@gmail.com","avatar":null},"body":"I recently installed Git version 2.7.2.windows.1 (I am running Windows\n7 64-bit).  Since the update, I have been unable to run `git add` with\nthe `-p` option on files within a certain directory (or its\nsubdirectories) whose name is `_` (an underscore).\n\n`git status` correctly reports that my file has changes:\n\n    PS C:\\Users\\Carl\\www\\dl> git status\n    On branch develop\n    Your branch is up-to-date with 'origin/develop'.\n    Changes not staged for commit:\n      (use \"git add <file>...\" to update what will be committed)\n      (use \"git checkout -- <file>...\" to discard changes in working directory)\n\n            modified:   _/php/class.Menu.php\n\nAnd I can add the entire file with a simple `git add`, or by\nspecifying the file by name.  But if I try to include the `-p` or\n`--patch` option (both variations produce the same results), Git\nreports that there are no changes:\n\n    PS C:\\Users\\Carl\\www\\dl> git add -p .\\_\\php\\class.Menu.php\n    No changes.\n\nThis only happens for files within the `_` directory, but it doesn't\nmatter whether I `cd` into that directory to run the `git add` command\nwithout having to explicitly specify a path with an underscore in it;\nit still doesn't work:\n\n    PS C:\\Users\\Carl\\www\\dl\\_\\php> git add -p .\\class.Menu.php\n    No changes.\n\nI also tried various directory names with underscores in them.  This\nissue occurs consistently if the updated file is in directory whose\nname contains only underscores (or in a subdirectory of such a\ndirectory), but not if there are other characters in the directory\nname.  I believe underscores are valid in file/directory names.\nAdditionally, I am not the owner of the project so I cannot rename the\ndirectory or move the file.  My collaborators mostly use OSX and do\nnot have this issue with their versions of Git.\n\nAs I normally use Git Bash, I had initially thought this problem was\nrelated to Posix path conversion in MinGW, but it occurs whether I use\nGit Bash, Windows PowerShell, or cmd.exe.\n"}]}