{"thread":{"id":"18535","subject":"Memory of past repositories in git remote?","startedAt":"2009-03-25T11:47:42Z","lastAt":"2009-03-25T14:51:40Z","messageCount":4,"participants":["Christophe de Dinechin","Santi Béjar","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"109344","messageId":"784F93DB-2D7C-4F48-88E8-BF56F01CD1E2@dinechin.org","threadId":"18535","inReplyTo":null,"subject":"Memory of past repositories in git remote?","fromName":"Christophe de Dinechin","fromEmail":"christophe.de.dinechin@gmail.com","sentAt":"2009-03-25T11:47:42Z","receivedAt":"2009-03-25T11:47:42Z","isPatch":false,"sender":{"key":"christophe.de.dinechin@gmail.com","avatar":null},"body":"I ran into a peculiar issue running git 1.6.1.2 on HP-UX: it looks  \nlike something has remembered an old repository and insists on  \nproviding that to \"git fetch\" instead of the new repository. Appending  \n\"/.\" at the end of the remote repository fixes the problem.\n\nHere are the details. I created a git repository in /home/ddd/vmm,  \nimpored some Subversion history, and started working with that. I  \ncreated a few branches, e.g. one called \"perrier\". Then, I realized  \nthat there was a better way to track Subversion changes, and so I  \nmoved the old repository as /home/ddd/vmm.git, and created a new one  \nthat I populated with \"git svn clone svn+ssh://path/to/repot -T trunk - \nb branches -t users\". That new repository has no branch named  \n\"perrier\" in it.\n\nNow, when I'm on another machine, create a new repository with the  \nsame \"git svn clone\", then do a \"git remote add ddd ssh://name@mymachine/home/ddd/vmm \n\", I would expect to pick up the repository that is actually under / \nhome/ddd/vmm on mymachine. But when I do a \"git svn fetch\", the output  \ncontains:\n\nwarning: no common commits\nremote: Counting objects: 66874, done.\nremote: Compressing objects: 100% (14626/14626), done.\nremote: Total 66874 (delta 51668), reused 66589 (delta 51418)\nReceiving objects: 100% (66874/66874), 96.41 MiB | 187 KiB/s, done\nResolving deltas: 100% (51668/51668), done.\n From ssh://name@mymachine/home/ddd/vmm\n* [new branch] perrier -> ddd/perrier\n...\n\nas well as all branches from /home/ddd/vmm.git (not /home/ddd/vmm). I  \ntried doing an \"ssh name@mymachine ls /home/ddd/vmm\" to check that  \nthis was indeed the new repository. If instead of \"/home/ddd/vmm\", I  \nspecify \"/home/ddd/vmm/.\", then I do get the branches in the new  \nrepository, e.g in that case I get:\n\n  * [new branch] tot -> ddd-good/tot\n\nThis is not just a name dependency, though, because if I specify / \nhome/./ddd/vmm, then I get the old repository again. So what seems to  \nmatter is the dot at the end of the repository name.\n\nI'm really puzzled by this behavior, and I have been unable to find  \nanything in the git documentation explaining it. I tried to find  \nreferences to vmm.git anywhere on either machines, but I couldn't.\n\nThis is easily reproduced, so I'm willing to run experiments to try  \nand debug the problem.\n\n\nThanks\nChristophe\n"},{"id":"109346","messageId":"adf1fd3d0903250505o38e0ac54jcf07f4425eee0a6@mail.gmail.com","threadId":"18535","inReplyTo":"784F93DB-2D7C-4F48-88E8-BF56F01CD1E2@dinechin.org","subject":"Re: Memory of past repositories in git remote?","fromName":"Santi Béjar","fromEmail":"santi@agolina.net","sentAt":"2009-03-25T12:05:21Z","receivedAt":"2009-03-25T12:05:21Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"2009/3/25 Christophe de Dinechin <christophe.de.dinechin@gmail.com>:\n> Here are the details. I created a git repository in /home/ddd/vmm, impored\n> some Subversion history, and started working with that. I created a few\n> branches, e.g. one called \"perrier\". Then, I realized that there was a\n> better way to track Subversion changes, and so I moved the old repository as\n> /home/ddd/vmm.git, and created a new one that I populated with \"git svn\n> clone svn+ssh://path/to/repot -T trunk -b branches -t users\". That new\n> repository has no branch named \"perrier\" in it.\n\nGit tries different url: $url/.git, $url.git and $url (I'm not sure\nabout the order).\n\nSo having $url and $url.git is asking for problems. I don't know if it\nis documented somewhere.\n\nHTH,\nSanti\n"},{"id":"109355","messageId":"49CA3E15.9020107@drmicha.warpmail.net","threadId":"18535","inReplyTo":"784F93DB-2D7C-4F48-88E8-BF56F01CD1E2@dinechin.org","subject":"Re: Memory of past repositories in git remote?","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-03-25T14:22:13Z","receivedAt":"2009-03-25T14:22:13Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Christophe de Dinechin venit, vidit, dixit 25.03.2009 12:47:\n> I ran into a peculiar issue running git 1.6.1.2 on HP-UX: it looks  \n> like something has remembered an old repository and insists on  \n> providing that to \"git fetch\" instead of the new repository. Appending  \n> \"/.\" at the end of the remote repository fixes the problem.\n> \n> Here are the details. I created a git repository in /home/ddd/vmm,  \n> impored some Subversion history, and started working with that. I  \n> created a few branches, e.g. one called \"perrier\". Then, I realized  \n> that there was a better way to track Subversion changes, and so I  \n> moved the old repository as /home/ddd/vmm.git, and created a new one  \n> that I populated with \"git svn clone svn+ssh://path/to/repot -T trunk - \n> b branches -t users\". That new repository has no branch named  \n> \"perrier\" in it.\n> \n> Now, when I'm on another machine, create a new repository with the  \n> same \"git svn clone\", then do a \"git remote add ddd ssh://name@mymachine/home/ddd/vmm \n> \", I would expect to pick up the repository that is actually under / \n> home/ddd/vmm on mymachine. But when I do a \"git svn fetch\", the output  \n> contains:\n> \n> warning: no common commits\n> remote: Counting objects: 66874, done.\n> remote: Compressing objects: 100% (14626/14626), done.\n> remote: Total 66874 (delta 51668), reused 66589 (delta 51418)\n> Receiving objects: 100% (66874/66874), 96.41 MiB | 187 KiB/s, done\n> Resolving deltas: 100% (51668/51668), done.\n>  From ssh://name@mymachine/home/ddd/vmm\n> * [new branch] perrier -> ddd/perrier\n> ...\n> \n> as well as all branches from /home/ddd/vmm.git (not /home/ddd/vmm). I  \n> tried doing an \"ssh name@mymachine ls /home/ddd/vmm\" to check that  \n> this was indeed the new repository. If instead of \"/home/ddd/vmm\", I  \n> specify \"/home/ddd/vmm/.\", then I do get the branches in the new  \n> repository, e.g in that case I get:\n> \n>   * [new branch] tot -> ddd-good/tot\n> \n> This is not just a name dependency, though, because if I specify / \n> home/./ddd/vmm, then I get the old repository again. So what seems to  \n> matter is the dot at the end of the repository name.\n> \n> I'm really puzzled by this behavior, and I have been unable to find  \n> anything in the git documentation explaining it. I tried to find  \n> references to vmm.git anywhere on either machines, but I couldn't.\n> \n> This is easily reproduced, so I'm willing to run experiments to try  \n> and debug the problem.\n\nGiven %s, git looks for existence of \"%s.git/.git\",\n * \"%s/.git\", \"%s.git\", \"%s\" in this order. So it's intentional\nbehavior, not a bug.\n\nThe idea is that non-bare repos should be chosen over bare ones, and\nbare ones are usually named something.git. One may argue whether %s/.git\nshould come before %s.git/.git.\n\nMichael\n"},{"id":"109356","messageId":"D264AF56-72BB-4658-9DD6-DAC10E3CADBC@dinechin.org","threadId":"18535","inReplyTo":"adf1fd3d0903250505o38e0ac54jcf07f4425eee0a6@mail.gmail.com","subject":"Re: Memory of past repositories in git remote?","fromName":"Christophe de Dinechin","fromEmail":"christophe@dinechin.org","sentAt":"2009-03-25T14:51:40Z","receivedAt":"2009-03-25T14:51:40Z","isPatch":false,"sender":{"key":"christophe@dinechin.org","avatar":null},"body":"Yep, that was it. I didn't realize that $url.git was being tested first.\n\nThanks\nChristophe\n\nOn 25 mars 09, at 13:05, Santi Béjar wrote:\n\n> 2009/3/25 Christophe de Dinechin <christophe.de.dinechin@gmail.com>:\n>> Here are the details. I created a git repository in /home/ddd/vmm,  \n>> impored\n>> some Subversion history, and started working with that. I created a  \n>> few\n>> branches, e.g. one called \"perrier\". Then, I realized that there  \n>> was a\n>> better way to track Subversion changes, and so I moved the old  \n>> repository as\n>> /home/ddd/vmm.git, and created a new one that I populated with \"git  \n>> svn\n>> clone svn+ssh://path/to/repot -T trunk -b branches -t users\". That  \n>> new\n>> repository has no branch named \"perrier\" in it.\n>\n> Git tries different url: $url/.git, $url.git and $url (I'm not sure\n> about the order).\n>\n> So having $url and $url.git is asking for problems. I don't know if it\n> is documented somewhere.\n>\n> HTH,\n> Santi\n"}]}