{"thread":{"id":"17202","subject":"Weird behaviour of git status","startedAt":"2009-01-16T08:42:51Z","lastAt":"2009-01-16T13:17:20Z","messageCount":3,"participants":["Nicolas Morey-Chaisemartin","Wincent Colaiuta","Sverre Rabbelier"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"100706","messageId":"4970488B.3010608@morey-chaisemartin.com","threadId":"17202","inReplyTo":null,"subject":"Weird behaviour of git status","fromName":"Nicolas Morey-Chaisemartin","fromEmail":"devel@morey-chaisemartin.com","sentAt":"2009-01-16T08:42:51Z","receivedAt":"2009-01-16T08:42:51Z","isPatch":false,"sender":{"key":"devel@morey-chaisemartin.com","avatar":null},"body":"Hello everyone,\n\nI just noticed a weird behaviour in git status.\nI have created new files in different directories in my project.\nI have added all of them in the index with git add.\nWhen I run \"git status\" It shows me that all my 3 files are in the index.\nHowever if I run git-status specifying a directory, it returns that the\nfile in this directory are in the index but the other one isn't.\n\nIn my opinion, it should\n- either display all the files as in the index (specifying a directory\nwouldn't have any effect then)\n- treat only file in the specified dir. So \"external\" files wouldn't be\nshown at all.\n\nThanks\n\nNicolas\n\nHere are the logs\n_________________________\nmoreychn@uranus-ubuntu:~/workspace/git/osmdc$ git --version\ngit version 1.6.1\nmoreychn@uranus-ubuntu:~/workspace/git/osmdc/include$ git status\n# On branch v3\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#    new file:   devmgr_common.h\n#    new file:   devmgr_types.h\n#    new file:   ../src/devmgr_common.c\n#\n# Changed but not updated:\n#   (use \"git add <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working\ndirectory)\n#\n#    modified:   ../src/osmdc_devmgr.h\n#\nmoreychn@uranus-ubuntu:~/workspace/git/osmdc/include$ git status .\n# On branch v3\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#    new file:   devmgr_common.h\n#    new file:   devmgr_types.h\n#\n# Changed but not updated:\n#   (use \"git add <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working\ndirectory)\n#\n#    modified:   ../src/osmdc_devmgr.h\n#\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#    ../src/devmgr_common.c\n"},{"id":"100710","messageId":"2A29AD77-2B8D-4491-92C1-62F5FFFBB00F@wincent.com","threadId":"17202","inReplyTo":"4970488B.3010608@morey-chaisemartin.com","subject":"Re: Weird behaviour of git status","fromName":"Wincent Colaiuta","fromEmail":"win@wincent.com","sentAt":"2009-01-16T09:44:45Z","receivedAt":"2009-01-16T09:44:45Z","isPatch":false,"sender":{"key":"greg@hurrell.net","avatar":"https://avatars.githubusercontent.com/u/7074?v=4"},"body":"El 16/1/2009, a las 9:42, Nicolas Morey-Chaisemartin escribió:\n\n> Hello everyone,\n>\n> I just noticed a weird behaviour in git status.\n> I have created new files in different directories in my project.\n> I have added all of them in the index with git add.\n> When I run \"git status\" It shows me that all my 3 files are in the  \n> index.\n> However if I run git-status specifying a directory, it returns that  \n> the\n> file in this directory are in the index but the other one isn't.\n>\n> In my opinion, it should\n> - either display all the files as in the index (specifying a directory\n> wouldn't have any effect then)\n> - treat only file in the specified dir. So \"external\" files wouldn't  \n> be\n> shown at all.\n\n\"git status\" shows you what would be committed if you ran \"git commit\"  \nwith the same parameters. So in your example, the output for \"git  \nstatus .\" is exactly as you would expect.\n\nThis is stated in the man page.\n\nCheers,\nWincent\n"},{"id":"100733","messageId":"bd6139dc0901160517ra26d69bw661816faaa91b339@mail.gmail.com","threadId":"17202","inReplyTo":"2A29AD77-2B8D-4491-92C1-62F5FFFBB00F@wincent.com","subject":"Re: Weird behaviour of git status","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-01-16T13:17:20Z","receivedAt":"2009-01-16T13:17:20Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"On Fri, Jan 16, 2009 at 10:44, Wincent Colaiuta <win@wincent.com> wrote:\n> \"git status\" shows you what would be committed if you ran \"git commit\" with\n> the same parameters. So in your example, the output for \"git status .\" is\n> exactly as you would expect.\n>\n> This is stated in the man page.\n\nThis is one of the first things I stumbled on when I started using\ngit. I often times wanted to do \"git status -- pathspec\" to see only\nwhat changed in a certain directory, rather than what would be\ncommitted if only the contents of that directory is committed.\n\n-- \nCheers,\n\nSverre Rabbelier\n"}]}