* Weird behaviour of git status
@ 2009-01-16 8:42 Nicolas Morey-Chaisemartin
2009-01-16 9:44 ` Wincent Colaiuta
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2009-01-16 8:42 UTC (permalink / raw)
To: git@vger.kernel.org
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Weird behaviour of git status
2009-01-16 8:42 Weird behaviour of git status Nicolas Morey-Chaisemartin
@ 2009-01-16 9:44 ` Wincent Colaiuta
2009-01-16 13:17 ` Sverre Rabbelier
0 siblings, 1 reply; 3+ messages in thread
From: Wincent Colaiuta @ 2009-01-16 9:44 UTC (permalink / raw)
To: devel; +Cc: git@vger.kernel.org
El 16/1/2009, a las 9:42, Nicolas Morey-Chaisemartin escribió:
> 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.
"git status" shows you what would be committed if you ran "git commit"
with the same parameters. So in your example, the output for "git
status ." is exactly as you would expect.
This is stated in the man page.
Cheers,
Wincent
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Weird behaviour of git status
2009-01-16 9:44 ` Wincent Colaiuta
@ 2009-01-16 13:17 ` Sverre Rabbelier
0 siblings, 0 replies; 3+ messages in thread
From: Sverre Rabbelier @ 2009-01-16 13:17 UTC (permalink / raw)
To: Wincent Colaiuta; +Cc: devel, git@vger.kernel.org
On Fri, Jan 16, 2009 at 10:44, Wincent Colaiuta <win@wincent.com> wrote:
> "git status" shows you what would be committed if you ran "git commit" with
> the same parameters. So in your example, the output for "git status ." is
> exactly as you would expect.
>
> This is stated in the man page.
This is one of the first things I stumbled on when I started using
git. I often times wanted to do "git status -- pathspec" to see only
what changed in a certain directory, rather than what would be
committed if only the contents of that directory is committed.
--
Cheers,
Sverre Rabbelier
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-16 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-16 8:42 Weird behaviour of git status Nicolas Morey-Chaisemartin
2009-01-16 9:44 ` Wincent Colaiuta
2009-01-16 13:17 ` Sverre Rabbelier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).