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

Memory of past repositories in git remote?

From
CDChristophe de Dinechin <christophe.de.dinechin@gmail.com>
Date
Mar 25, 2009, 11:47 UTC
Message-ID
<784F93DB-2D7C-4F48-88E8-BF56F01CD1E2@dinechin.org>

I ran into a peculiar issue running git 1.6.1.2 on HP-UX: it looks like something has remembered an old repository and insists on providing that to "git fetch" instead of the new repository. Appending "/." at the end of the remote repository fixes the problem.

Here are the details. I created a git repository in /home/ddd/vmm, impored some Subversion history, and started working with that. I created a few branches, e.g. one called "perrier". Then, I realized that there was a better way to track Subversion changes, and so I moved the old repository as /home/ddd/vmm.git, and created a new one that I populated with "git svn clone svn+ssh://path/to/repot -T trunk - b branches -t users". That new repository has no branch named "perrier" in it.

Now, when I'm on another machine, create a new repository with the same "git svn clone", then do a "git remote add ddd ssh://name@mymachine/home/ddd/vmm ", I would expect to pick up the repository that is actually under / home/ddd/vmm on mymachine. But when I do a "git svn fetch", the output contains:

warning: no common commits
remote: Counting objects: 66874, done.
remote: Compressing objects: 100% (14626/14626), done.
remote: Total 66874 (delta 51668), reused 66589 (delta 51418)
Receiving objects: 100% (66874/66874), 96.41 MiB | 187 KiB/s, done
Resolving deltas: 100% (51668/51668), done.
 From ssh://name@mymachine/home/ddd/vmm
* [new branch] perrier -> ddd/perrier
...

as well as all branches from /home/ddd/vmm.git (not /home/ddd/vmm). I tried doing an "ssh name@mymachine ls /home/ddd/vmm" to check that this was indeed the new repository. If instead of "/home/ddd/vmm", I specify "/home/ddd/vmm/.", then I do get the branches in the new repository, e.g in that case I get:

  * [new branch] tot -> ddd-good/tot

This is not just a name dependency, though, because if I specify / home/./ddd/vmm, then I get the old repository again. So what seems to matter is the dot at the end of the repository name.

I'm really puzzled by this behavior, and I have been unable to find anything in the git documentation explaining it. I tried to find references to vmm.git anywhere on either machines, but I couldn't.

This is easily reproduced, so I'm willing to run experiments to try and debug the problem.

Thanks Christophe

Next: Santi Béjar
Message 1 of 4 in “Memory of past repositories in git remote?”
  1. Christophe de DinechinMar 25, 2009
  2. Santi BéjarMar 25, 2009
  3. Christophe de DinechinMar 25, 2009
  4. Michael J GruberMar 25, 2009

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.