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

Re: git-fetch does not work from .git subdirectory

From
TTTimur Tabi <timur@freescale.com>
Date
Nov 26, 2012, 16:09 UTC
Message-ID
<50B3942E.2020001@freescale.com>
In-Reply-To
<50AD77F3.3080702@mail.pgornicz.com>
Patrik Gornicz wrote:
> Just a hunch but your remote's location uses a relative path 
> '../linux-2.6.git', perhaps git is messing up what the path is relative 
> to.

That makes sense. Git is looking at the URL and not realizing that it's relative to the home directory.

[remote "upstream"]
	url = ../linux-2.6.git/
	fetch = +refs/heads/*:refs/remotes/upstream/*
> Note sure what the fix will be though as it'll likely break existing 
> repositories that use relative paths either way. Can you try an 
> absolute path to see if that fixes thing?
If I change that to
[remote "upstream"]
	url = /home/b04825/git/linux-2.6.git/
	fetch = +refs/heads/*:refs/remotes/upstream/*
then everything works.
IMHO, this is a bug in git.
-- 
Timur Tabi
Linux kernel developer at Freescale
Previous: Patrik Gornicz
Message 3 of 3 in “git-fetch does not work from .git subdirectory”
  1. Timur TabiNov 20, 2012
  2. Patrik GorniczNov 22, 2012
  3. Timur TabiNov 26, 2012

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.