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

problems of git-status

From
LYLiu Yubao <yubao.liu@gmail.com>
Date
Mar 28, 2007, 07:59 UTC
Message-ID
<460A2054.20404@gmail.com>
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.
Next: Junio C Hamano
Message 1 of 2 in “problems of git-status”
  1. Liu YubaoMar 28, 2007
  2. Junio C HamanoMar 28, 2007

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.