{"thread":{"id":"41504","subject":"Some strange behavior of git","startedAt":"2016-02-24T22:43:04Z","lastAt":"2016-02-25T16:43:08Z","messageCount":6,"participants":["Olga Pshenichnikova","Stefan Beller","Randall S. Becker","Thomas Gummerer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"279188","messageId":"56CE31F8.7090706@ip-5.ru","threadId":"41504","inReplyTo":null,"subject":"Some strange behavior of git","fromName":"Olga Pshenichnikova","fromEmail":"olga@ip-5.ru","sentAt":"2016-02-24T22:43:04Z","receivedAt":"2016-02-24T22:43:04Z","isPatch":false,"sender":{"key":"olga@ip-5.ru","avatar":null},"body":"Hello,\nwe use git in our project.\nWhat can be cause for further confusing behavior?\n\n     git@ip5server:~$ git status\n     On branch master\n     Untracked files:\n       (use \"git add <file>...\" to include in what will be committed)\n\n         app/addons/arliteks/\n\n     nothing added to commit but untracked files present (use \"git add\" \nto track)\n     git@ip5server:~$ git clean -dn\n     Would remove app/addons/arliteks/\n     Would remove design/\n     Would remove js/\n     Would remove var/langs/en/\n\nWhy I don't see all 4 directories in first command?\n"},{"id":"279189","messageId":"CAGZ79kYGusB_hF6mgbpC3HAiWUUVOZHnEcS+hJiE1PMaehcw8A@mail.gmail.com","threadId":"41504","inReplyTo":"56CE31F8.7090706@ip-5.ru","subject":"Re: Some strange behavior of git","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2016-02-24T22:57:10Z","receivedAt":"2016-02-24T22:57:10Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Wed, Feb 24, 2016 at 2:43 PM, Olga Pshenichnikova <olga@ip-5.ru> wrote:\n> Hello,\n> we use git in our project.\n> What can be cause for further confusing behavior?\n>\n>     git@ip5server:~$ git status\n>     On branch master\n>     Untracked files:\n>       (use \"git add <file>...\" to include in what will be committed)\n>\n>         app/addons/arliteks/\n>\n>     nothing added to commit but untracked files present (use \"git add\" to\n> track)\n>     git@ip5server:~$ git clean -dn\n>     Would remove app/addons/arliteks/\n>     Would remove design/\n>     Would remove js/\n>     Would remove var/langs/en/\n>\n> Why I don't see all 4 directories in first command?\n\nLook at the effects of the .gitignore file\n\nhttps://git-scm.com/docs/gitignore\n\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"279224","messageId":"002a01d16f58$7fe9f7e0$7fbde7a0$@nexbridge.com","threadId":"41504","inReplyTo":"56CE31F8.7090706@ip-5.ru","subject":"RE: Some strange behavior of git","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2016-02-24T23:10:00Z","receivedAt":"2016-02-24T23:10:00Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On February 24, 2016 5:43 PM, Olga Pshenichnikova wrote\n> What can be cause for further confusing behavior?\n> \n>      git@ip5server:~$ git status\n>      On branch master\n>      Untracked files:\n>        (use \"git add <file>...\" to include in what will be committed)\n> \n>          app/addons/arliteks/\n> \n>      nothing added to commit but untracked files present (use \"git add\"\n> to track)\n>      git@ip5server:~$ git clean -dn\n>      Would remove app/addons/arliteks/\n>      Would remove design/\n>      Would remove js/\n>      Would remove var/langs/en/\n> \n> Why I don't see all 4 directories in first command?\n\nWhat do your .gitignore files contain in this project?\n\nCheers,\nRandall\n-- Brief whoami: NonStop&UNIX developer since approximately UNIX(421664400)/NonStop(211288444200000000)\n-- In my real life, I talk too much.\n"},{"id":"279306","messageId":"20160225095755.GJ1831@hank","threadId":"41504","inReplyTo":"56CE31F8.7090706@ip-5.ru","subject":"Re: Some strange behavior of git","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2016-02-25T09:57:55Z","receivedAt":"2016-02-25T09:57:55Z","isPatch":false,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"On 02/25, Olga Pshenichnikova wrote:\n> Hello,\n> we use git in our project.\n> What can be cause for further confusing behavior?\n>\n>     git@ip5server:~$ git status\n>     On branch master\n>     Untracked files:\n>       (use \"git add <file>...\" to include in what will be committed)\n>\n>         app/addons/arliteks/\n>\n>     nothing added to commit but untracked files present (use \"git add\" to\n> track)\n>     git@ip5server:~$ git clean -dn\n>     Would remove app/addons/arliteks/\n>     Would remove design/\n>     Would remove js/\n>     Would remove var/langs/en/\n>\n> Why I don't see all 4 directories in first command?\n\nAre the design/, js/ and var/langs/en/ directories empty?  Git doesn't\ntrack empty directories, so they won't show up in git status, but with\ngit clean -d you specify that Git should also remove untracked\ndirectories, which is why you see them here.\n\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n--\nThomas\n"},{"id":"279343","messageId":"20160225161409.GK1831@hank","threadId":"41504","inReplyTo":"56CED1F8.60601@ip-5.ru","subject":"Re: Some strange behavior of git","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2016-02-25T16:14:09Z","receivedAt":"2016-02-25T16:14:09Z","isPatch":false,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"[Please keep everyone cc'd in the conversation, especially the mailing\nlist.  I added it back for now.\nAlso please don't top post on the list]\n\nOn 02/25, Olga Pshenichnikova wrote:\n> No, it isn't empty, but I found the problem.\n> Problem was that I handled subdirectories structure in exclude file:\n>\n> design/dir1\n> design/dir2\n>\n> But\n>\n> design/dir3 wasn't ignored and wasn't controlled.\n>\n> So, my problem take place when some sub directory both isn't ignored AND\n> isn't controlled even if it isn't empty.\n\nI think that's a bug, I think this directory should only be removed if\n-x is given.  I haven't come up with a patch yet, but here's a test\ndemonstrating the failure.\n\ndiff --git a/t/t7300-clean.sh b/t/t7300-clean.sh\nindex 86ceb38..0961007 100755\n--- a/t/t7300-clean.sh\n+++ b/t/t7300-clean.sh\n@@ -653,4 +653,13 @@ test_expect_success 'git clean -d respects pathspecs (pathspec is prefix of dir)\n \ttest_path_is_dir foobar\n '\n\n+test_expect_failure 'git clean -d does not clean ignored files in subdir' '\n+\tmkdir -p sub/dir &&\n+\t>sub/dir/file &&\n+\ttest_when_finished rm .gitignore &&\n+\techo sub/dir/ >.gitignore &&\n+\tgit clean -df sub &&\n+\ttest_path_is_file sub/dir/file\n+'\n+\n test_done\n\n\n> Thank you for response!\n"},{"id":"279346","messageId":"56CF2F1C.9070803@ip-5.ru","threadId":"41504","inReplyTo":"20160225161409.GK1831@hank","subject":"Re: Some strange behavior of git","fromName":"Olga Pshenichnikova","fromEmail":"olga@ip-5.ru","sentAt":"2016-02-25T16:43:08Z","receivedAt":"2016-02-25T16:43:08Z","isPatch":false,"sender":{"key":"olga@ip-5.ru","avatar":null},"body":"Thanx )\n\nOn 02/25/2016 07:14 PM, Thomas Gummerer wrote:\n> [Please keep everyone cc'd in the conversation, especially the mailing\n> list.  I added it back for now.\n> Also please don't top post on the list]\n>\n> On 02/25, Olga Pshenichnikova wrote:\n>> No, it isn't empty, but I found the problem.\n>> Problem was that I handled subdirectories structure in exclude file:\n>>\n>> design/dir1\n>> design/dir2\n>>\n>> But\n>>\n>> design/dir3 wasn't ignored and wasn't controlled.\n>>\n>> So, my problem take place when some sub directory both isn't ignored AND\n>> isn't controlled even if it isn't empty.\n> I think that's a bug, I think this directory should only be removed if\n> -x is given.  I haven't come up with a patch yet, but here's a test\n> demonstrating the failure.\n>\n> diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh\n> index 86ceb38..0961007 100755\n> --- a/t/t7300-clean.sh\n> +++ b/t/t7300-clean.sh\n> @@ -653,4 +653,13 @@ test_expect_success 'git clean -d respects pathspecs (pathspec is prefix of dir)\n>   \ttest_path_is_dir foobar\n>   '\n>\n> +test_expect_failure 'git clean -d does not clean ignored files in subdir' '\n> +\tmkdir -p sub/dir &&\n> +\t>sub/dir/file &&\n> +\ttest_when_finished rm .gitignore &&\n> +\techo sub/dir/ >.gitignore &&\n> +\tgit clean -df sub &&\n> +\ttest_path_is_file sub/dir/file\n> +'\n> +\n>   test_done\n>\n>\n>> Thank you for response!\n"}]}