Re: git ls-files -o under .git/ prints all repository files
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 19, 2007, 15:00 UTC
- Message-ID
- <Pine.LNX.4.63.0701191600020.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <1169214414.18684.25.camel@localhost.localdomain>
Hi,
On Fri, 19 Jan 2007, Matthias Kestenholz wrote:
Show 23 quoted lines
> On Fri, 2007-01-19 at 14:30 +0100, Andreas Ericsson wrote: > > Alex Riesen wrote: > > > On 1/19/07, Simon 'corecode' Schubert <corecode@fs.ei.tum.de> wrote: > > >> > > > >> > > >> % cd .hg && hg status -A . > > >> abort: path contains illegal component: .hg > > >> > > >> I think this is a sensible thing to do. > > > > > > No, it isn't. It is not unlikely to have repo in repo > > > (and some people already have them). > > > Mercurial is wrong here. > > > > For managing repos inside repos (onion repos?) I think it should > > be safe to abort if we're not at top-level. > > > > > Why not check for /.git/ somewhere inside the current working directory > (pwd) ? That's the way mercurial does it currently, and I think that is > a sane thing to do _if_ you want to protect the user from his own > stupidity.
There are valid reasons why you might want to have a (possibly temporary) repository _inside_ the GIT_DIR. You'd break these cases.
Ciao, Dscho