git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [bug] git-add won't add foo/.git/bar

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 25, 2008, 00:11 UTC
Message-ID
<7v1w5zslv5.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<Pine.LNX.4.64.0803242359230.24262@kaos.quantumfyre.co.uk>
Julian Phillips <julian@quantumfyre.co.uk> writes:
Show 10 quoted lines
> 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.

Also it is false that we should only care about the first one. Think submodules.

Previous: Julian PhillipsNext: Julian Phillips
Message 3 of 10 in “[bug] git-add won't add foo/.git/bar”
  1. Michael GebetsroitherMar 24, 2008
  2. Julian PhillipsMar 25, 2008
  3. Junio C HamanoMar 25, 2008
  4. Julian PhillipsMar 25, 2008
  5. Junio C HamanoMar 25, 2008
  6. Julian PhillipsMar 25, 2008
  7. Documentation/git.txt: Mention unsupported use of --git-dir/GIT_DIRJulian Phillips, Mar 25, 2008
  8. Michael GebetsroitherMar 25, 2008
  9. Julian PhillipsMar 25, 2008
  10. Michael GebetsroitherMar 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.