* problems of git-status
@ 2007-03-28 7:59 Liu Yubao
2007-03-28 8:57 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Liu Yubao @ 2007-03-28 7:59 UTC (permalink / raw)
To: git
Hi,
I find "git status" and "git status ." have different output and the latter
will go wrong in the case below:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#!/bin/sh
rm -rf tt; mkdir tt; cd tt
git init
mkdir AA
echo hello>a
git add .
echo world>a
echo "different output..."
echo "--------------------git status-------------"
git status
echo "--------------------git status . ----------"
git status .
git add a
git commit -m "test"
echo hello world>a
git add a
sleep 4
echo world hello>a
echo "--------------------git status-------------"
git status
echo "--------------------git status . ----------"
git status .
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
I use git version 1.5.1.rc2.15.g465b3, "git repo-config -l" shows:
core.filemode=false
core.logallrefupdates=true
core.compression=9
diff.color=auto
pack.window=64
merge.summary=true
core.repositoryformatversion=0
core.filemode=false
core.bare=false
Here is the output of that script:
Initialized empty Git repository in .git/
different output...
--------------------git status-------------
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: a
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
#
# modified: a
#
--------------------git status . ----------
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: a
#
Created initial commit dc57cb444335e73ce3320c1e368765b1a92e3be5
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a
--------------------git status-------------
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: a
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
#
# modified: a
#
--------------------git status . ----------
fatal: Entry 'a' not uptodate. Cannot merge.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: problems of git-status
2007-03-28 7:59 problems of git-status Liu Yubao
@ 2007-03-28 8:57 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2007-03-28 8:57 UTC (permalink / raw)
To: Liu Yubao; +Cc: git
Liu Yubao <yubao.liu@gmail.com> writes:
> I find "git status" and "git status ." have different output.
Think of "git status $ANY_ARGUMENTS" a preview of "git commit
$ANY_ARGUMENTS". If you have local modifications, "git commit"
and "git commit ." would do different things, so corresponding
"git status" should give you different output.
By giving "." to git status, the latter form is asking what
reminder message you would see in the commit log message buffer
if you say "git commit ."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-28 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-28 7:59 problems of git-status Liu Yubao
2007-03-28 8:57 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox