* Memory of past repositories in git remote?
@ 2009-03-25 11:47 Christophe de Dinechin
2009-03-25 12:05 ` Santi Béjar
2009-03-25 14:22 ` Michael J Gruber
0 siblings, 2 replies; 4+ messages in thread
From: Christophe de Dinechin @ 2009-03-25 11:47 UTC (permalink / raw)
To: git; +Cc: Christophe de Dinechin
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Memory of past repositories in git remote?
2009-03-25 11:47 Memory of past repositories in git remote? Christophe de Dinechin
@ 2009-03-25 12:05 ` Santi Béjar
2009-03-25 14:51 ` Christophe de Dinechin
2009-03-25 14:22 ` Michael J Gruber
1 sibling, 1 reply; 4+ messages in thread
From: Santi Béjar @ 2009-03-25 12:05 UTC (permalink / raw)
To: Christophe de Dinechin; +Cc: git, Christophe de Dinechin
2009/3/25 Christophe de Dinechin <christophe.de.dinechin@gmail.com>:
> 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.
Git tries different url: $url/.git, $url.git and $url (I'm not sure
about the order).
So having $url and $url.git is asking for problems. I don't know if it
is documented somewhere.
HTH,
Santi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Memory of past repositories in git remote?
2009-03-25 11:47 Memory of past repositories in git remote? Christophe de Dinechin
2009-03-25 12:05 ` Santi Béjar
@ 2009-03-25 14:22 ` Michael J Gruber
1 sibling, 0 replies; 4+ messages in thread
From: Michael J Gruber @ 2009-03-25 14:22 UTC (permalink / raw)
To: Christophe de Dinechin; +Cc: git, Christophe de Dinechin, Santi Béjar
Christophe de Dinechin venit, vidit, dixit 25.03.2009 12:47:
> 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.
Given %s, git looks for existence of "%s.git/.git",
* "%s/.git", "%s.git", "%s" in this order. So it's intentional
behavior, not a bug.
The idea is that non-bare repos should be chosen over bare ones, and
bare ones are usually named something.git. One may argue whether %s/.git
should come before %s.git/.git.
Michael
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Memory of past repositories in git remote?
2009-03-25 12:05 ` Santi Béjar
@ 2009-03-25 14:51 ` Christophe de Dinechin
0 siblings, 0 replies; 4+ messages in thread
From: Christophe de Dinechin @ 2009-03-25 14:51 UTC (permalink / raw)
To: Santi Béjar; +Cc: Christophe de Dinechin, Christophe de Dinechin, git
Yep, that was it. I didn't realize that $url.git was being tested first.
Thanks
Christophe
On 25 mars 09, at 13:05, Santi Béjar wrote:
> 2009/3/25 Christophe de Dinechin <christophe.de.dinechin@gmail.com>:
>> 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.
>
> Git tries different url: $url/.git, $url.git and $url (I'm not sure
> about the order).
>
> So having $url and $url.git is asking for problems. I don't know if it
> is documented somewhere.
>
> HTH,
> Santi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-25 14:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-25 11:47 Memory of past repositories in git remote? Christophe de Dinechin
2009-03-25 12:05 ` Santi Béjar
2009-03-25 14:51 ` Christophe de Dinechin
2009-03-25 14:22 ` Michael J Gruber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).