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

[BUG] Git looks for repository in wrong directory

From
David ‘Bombe’ Roden <bombe@pterodactylus.net>
Date
Jul 3, 2008, 00:16 UTC
Message-ID
<200807030216.28921.bombe@pterodactylus.net>
Hi.
The following sequence:

mkdir r1 cd r1 git init echo a > a git add a git commit -m "a" cd .. git clone r1 r1.git cd r1 echo b > b git add b git commit -m "b" cd .. git ls-remote r1 git ls-remote r1/.

shows that Git searches for a repository in the wrong place. I think the last two commands should output exactly the same but "git ls-remote r1" actually lists the contents of "r1.git". Is that a bug or is this (extremely confusing) behaviour intended?

This also afflicts the behaviour of "git-pull" and friends. I cloned a directory and tried to pull new commits but I repeatedly got stuck with an older commit. I have to move a second directory that was named like the first directory, only with an appended ".git", out of the way so that I could access the repository I asked for.

Used Git version is 1.5.6.1 on Linux 2.6.25.6 (Gentoo/x86).
	David
Next: Junio C Hamano
Message 1 of 4 in “[BUG] Git looks for repository in wrong directory”
  1. David ‘Bombe’ RodenJul 3, 2008
  2. Junio C HamanoJul 3, 2008
  3. David ‘Bombe’ RodenJul 3, 2008
  4. Junio C HamanoJul 3, 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.