Re: [regression?] "git status -a" reports modified for empty submodule directory
- From
Ping Yin <pkufranky@gmail.com>
- Date
- Apr 22, 2008, 12:39 UTC
- Message-ID
- <46dff0320804220539y51c02dedoe181a0eed8599902@mail.gmail.com>
- In-Reply-To
- <480DD6D8.9040900@viscovery.net>
On Tue, Apr 22, 2008 at 8:15 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 45 quoted lines
> Ping Yin schrieb: > > > # create a super project super > > $ mkdir super && cd super && git init > > $ touch foo && git add foo && git commit -m "add foo" > > > > # create a sub project sub > > $ mkdir sub && cd sub && git init > > $ touch bar && git add bar && git commit -m "add bar" > > > > # add sub project to super project > > $ cd .. > > $ git add sub && git commit -m 'add sub' > > > > # remote contents of subproject > > $ rm -rf sub/* sub/.git > > > > # git status -a regression > > $ git status > > # On branch master > > nothing to commit (working directory clean) > > This should have reported: > > # On branch master > # Changed but not updated: > # (use "git add/rm <file>..." to update what will be committed) > # > # deleted: sub > no changes added to commit (use "git add" and/or "git commit -a") > > Right? > > > > $ git status -a > > # On branch master > > # Changes to be committed: > > # (use "git reset HEAD <file>..." to unstage) > > # > > # deleted: sub > > # > > There's nothing wrong with this. > > -- Hannes
It seems that in 1.5.4, both 'git status' and 'git status -a' report "no changes added to commit". And i think this is the right behaviour. Because when a super project is cloned, all submodule directories are empty in the beginning. In this case 'git status' and 'git status -a' should report " no changes added to commit".
-- Ping Yin