Re: [bug] git-add won't add foo/.git/bar
- From
Julian Phillips <julian@quantumfyre.co.uk>
- Date
- Mar 25, 2008, 00:23 UTC
- Message-ID
- <Pine.LNX.4.64.0803250017450.27378@kaos.quantumfyre.co.uk>
- In-Reply-To
- <7v1w5zslv5.fsf@gitster.siamese.dyndns.org>
On Mon, 24 Mar 2008, Junio C Hamano wrote:
Show 14 quoted lines
> Julian Phillips <julian@quantumfyre.co.uk> writes: > >> On Tue, 25 Mar 2008, Michael Gebetsroither wrote: >> >>> hi, >>> >>> % git-add -f foo/.git/bar >>> fatal: unable to add foo/.git/bar to index >> >> 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.
So I can't _ever_ have a directory/file called '.git'? But I _can_ add files inside my repository provided that the repository is not called .git? How is that not an oops, or extremely confusing at the least?
i.e.:
'git add .git/fred' fails 'git --git-dir=.git_repos --work-tree=. add .git/fred' fails 'git --git-dir=.git_repos --work-tree=. add .git_repos/fred' works
> Also it is false that we should only care about the first one. Think > submodules.
Ok, true. I've never used submodules, can you add things inside submodules from the parent? If so, where do they get added - presumably to the submodule?
Show 5 quoted lines
> -- > 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 >
-- Julian --- Ya'll hear about the geometer who went to the beach to catch some rays and became a tangent ?