{"thread":{"id":"46902","subject":"Weird behavior/bug for git clean in untracked directory","startedAt":"2017-10-04T19:13:00Z","lastAt":"2017-10-04T19:13:00Z","messageCount":1,"participants":["David Spångberg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"329702","messageId":"8760bu7mxh.fsf@tunna.org","threadId":"46902","inReplyTo":null,"subject":"Weird behavior/bug for git clean in untracked directory","fromName":"David Spångberg","fromEmail":"david@tunna.org","sentAt":"2017-10-04T19:06:18Z","receivedAt":"2017-10-04T19:13:00Z","isPatch":false,"sender":{"key":"david@tunna.org","avatar":null},"body":"Hello\n\nI'm a little bit confused about the behavior of git clean when trying to\nclean multiple files/directories at once. For instance if I create two\ndirectories with an empty file in an new git repository as such:\n\n  mkdir tmprepo\n  cd tmprepo\n  git init\n  mkdir a b\n  touch a/file b/file\n\nand try to clean both these files at the same time with git clean as\nsuch:\n\n  git clean -f a/file b/file\n\nthen git will not clean any of the files. However, if I separate the\ncleaning into two separate calls like this:\n\n  git clean -f a/file\n  git clean -f b/file\n\nthen both directories will be cleaned. The git clean manual page suggests\ngit clean should support multiple paths/directories:\n\n  SYNOPSIS\n         git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>...\n\n  DESCRIPTION\n         ...\n         If any optional <path>... _arguments_ are given, only those _paths_ are affected.\n\nThe expected behavior for me would be that there should be no difference\nbetween the first `git clean...' with two files and the two\n`git clean...' with one file each.\n\nI've tested on the following git versions so far:\n\n  * 2.1.4\n  * 2.14.2\n  * 2.14.2.959.g6663358d3 (currently latest on next branch)\n\n\nBest regards,\nDavid\n"}]}