Re: [bug] git-add won't add foo/.git/bar
- From
Julian Phillips <julian@quantumfyre.co.uk>
- Date
- Mar 25, 2008, 00:55 UTC
- Message-ID
- <Pine.LNX.4.64.0803250045120.30488@kaos.quantumfyre.co.uk>
- In-Reply-To
- <7vve3br6ct.fsf@gitster.siamese.dyndns.org>
On Mon, 24 Mar 2008, Junio C Hamano wrote:
Show 10 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > >>> Well, git won't allow .git as a element anywhere in the path, when we >>> should only care about the _first_ one - and also, if you use >>> --git-dir=banana then we still check for '.git' ... oops. >> >> That's not how git-dir is supposed to used, so there is no oops. > > The only purpose of git-dir is to have $GIT_DIR elsewhere _outside_ the > work tree.
That's fair enough. It's not enforced, or discourgaed in the documentation though. Would a patch to mention that using --git-dir/GIT_DIR to change the name _inside_ the work tree is not supported be accepted?
> A few weeks ago somebody wanted to rename .git and I thought I responded > well enough. You certainly did not ask CVS or SVN folks to rename the > control directories they sprinkle in your work trees to .cvs or .svn, did > you?
Well, no - but then I hold git to a higher standard. ;)
> Leave .git alone so that people don't get confused.
Agreed, it is a) a lot simpler to explain, b) less likely to break things. Sorry for wasting your time :$, an interesting poke around the code though. :)
Something I noticed that seemed a bit odd when playing with this, should I expect git to stop me from trying to add files inside subprojects to the main project? It seems to just discard the submodule and turn it into a normal directory when I do. Is that intended behaviour?
-- Julian --- Excess on occasion is exhilarating. It prevents moderation from acquiring the deadening effect of a habit. -- W. Somerset Maugham