git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Weird behaviour of git status

From
NMNicolas Morey-Chaisemartin <devel@morey-chaisemartin.com>
Date
Jan 16, 2009, 08:42 UTC
Message-ID
<4970488B.3010608@morey-chaisemartin.com>
Hello everyone,

I just noticed a weird behaviour in git status. I have created new files in different directories in my project. I have added all of them in the index with git add. When I run "git status" It shows me that all my 3 files are in the index. However if I run git-status specifying a directory, it returns that the file in this directory are in the index but the other one isn't.

In my opinion, it should
- either display all the files as in the index (specifying a directory
wouldn't have any effect then)
- treat only file in the specified dir. So "external" files wouldn't be
shown at all.
Thanks
Nicolas

Here are the logs _________________________ moreychn@uranus-ubuntu:~/workspace/git/osmdc$ git --version git version 1.6.1 moreychn@uranus-ubuntu:~/workspace/git/osmdc/include$ git status # On branch v3 # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: devmgr_common.h # new file: devmgr_types.h # new file: ../src/devmgr_common.c # # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: ../src/osmdc_devmgr.h # moreychn@uranus-ubuntu:~/workspace/git/osmdc/include$ git status . # On branch v3 # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: devmgr_common.h # new file: devmgr_types.h # # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: ../src/osmdc_devmgr.h # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # ../src/devmgr_common.c

Next: Wincent Colaiuta
Message 1 of 3 in “Weird behaviour of git status”
  1. Nicolas Morey-ChaisemartinJan 16, 2009
  2. Wincent ColaiutaJan 16, 2009
  3. Sverre RabbelierJan 16, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.