[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: [regression?] "git status -a" reports modified for empty submodule directory
From: "Ping Yin" <pkufranky () gmail ! com>
Date: 2008-04-30 15:56:29
Message-ID: 46dff0320804300856w941d948rbcc1cee06f1b41a9 () mail ! gmail ! com
[Download RAW message or body]
On Wed, Apr 30, 2008 at 3:29 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
>
> For example, it has long been known ever since submodules were introduced
> that if you work inside a sparsely checked out supermodule you have to use
> "commit -a" with care, because the command notices missing submodule, and
> there is no way for it to differenciate between the case you _want to_
> remove it and the case you did not care about it,
If i am not misunderstood, there is one way now (although broken now,
it used this kind of behaviour before git-status became built-in):
empty directory to denote that the submodule is not checked out and
unaware, and deleted directory to denote that the submodule is
deleted.
Actually, i don't like the empty directory trick, since it will leave
so many empty directories in a repository with many submodules
unchecked out.
>
> That quirk was something people could live with while submodule support
> was merely a newly invented curiosity. But I do not think a command at
> high level (iow Porcelain) such as commit and status should be left
> unaware of the Policy that equate missing submodule and unmodified one
> forever. We should actively enforce the policy, so that unless you
> explicitly ask nicely, the command should consider a missing submodule
> just as unmodified, e.g. "commit -a" should not remove unchecked out
> submodules.
>
> But then you would need a way to ask nicely. How? Perhaps using "git rm",
> and low level "update-index --remove". Do we even need "commit -A"? I
> doubt it --- you do not remove submodules every day.
>
> We'd like to keep the lowest-level unaware of the Policy, which means that
> "diff-files" and "diff-index" should report unchecked out submodules.
> Otherwise script writers will be left with no way to differenciate missing
> and removed submodules.
Good point.
>
> Once we start doing this, I think "git diff" Porcelain should fall into
> Policy-aware category.
>
Agree this pilicy.
If this change needs a long way. Should we fix the regression first?
Anyway, 'git status' and 'git status -a' should behave the same for
submodules unchecked out. I have tried but i failed. I just found this
regression was introduced on the first day of built-in status
--
Ping Yin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic