{"thread":{"id":"25081","subject":"Re: tgt submodule?","startedAt":"2010-09-12T11:39:05Z","lastAt":"2010-09-12T11:39:05Z","messageCount":1,"participants":["Boaz Harrosh"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"150533","messageId":"4C8CBBD9.3090409@panasas.com","threadId":"25081","inReplyTo":"98e3b9f65ffe7883ced7474859b147f4@umich.edu","subject":"Re: tgt submodule?","fromName":"Boaz Harrosh","fromEmail":"bharrosh@panasas.com","sentAt":"2010-09-12T11:39:05Z","receivedAt":"2010-09-12T11:39:05Z","isPatch":false,"sender":{"key":"bharrosh@panasas.com","avatar":"https://gravatar.com/avatar/347e426f8ca0409f6891ceeefd4c3c2d8769608382323057efeaa362b4c3dbf3?d=mp&s=160"},"body":"On 09/09/2010 10:11 PM, Bryan Smith wrote:\n> \n> Sorry for being out of touch for so long, things have been hectic. I've\n> been trying to get a final testing solution of VMs set up, and now all of a\n> sudden the tgt submodule seems to be inaccessible. When I clone the osc-osd\n> source, I receive the following:\n> \n> remote: Counting objects: 6559, done.\n> remote: Compressing objects: 100% (2445/2445), done.\n> remote: Total 6559 (delta 4250), reused 6244 (delta 4024)\n> Receiving objects: 100% (6559/6559), 1.33 MiB | 258 KiB/s, done.\n> Resolving deltas: 100% (4250/4250), done.\n> Submodule 'tgt' (git://git.open-osd.org/tgt/.git) registered for path 'tgt'\n> Initialized empty Git repository in\n> /home/branches/mikesucks/osc-osd/tgt/.git/\n> fatal: The remote end hung up unexpectedly\n> Clone of 'git://git.open-osd.org/tgt/.git' into submodule path 'tgt' failed\n> \n> Trying to receive the submodule through git from within yields the same\n> problem:\n> \n> $ sudo git submodule update\n> Initialized empty Git repository in\n> /home/branches/mikesucks/osc-osd/tgt/.git/\n> fatal: The remote end hung up unexpectedly\n> Clone of 'git://git.open-osd.org/tgt/.git' into submodule path 'tgt' failed\n> \n> From what I've researched on the internet, it seems to me that the source\n> itself is having the problem. Do you have any further knowledge of this\n> problem? Thanks in advance,\n> \n> Bryan Smith\n> CITI\n\nHa, that problem. Rrrr sorry about that. I'm in a catch 22 here, since\nI enabled support for http:// cloning the git:// people with old trees and\nold instructions have problems.\n\nHere is what to do:\n- For new trees do\n[]$ git clone --recursive git://git.open-osd.org/osc-osd/.git\n\n  Note the \"/.git\" at the end. If not supplied then the base tree will\n  clone but the tgt submodule will fail. This is because for (dumb) http:\n  clones you must supply the \"/.git\" at the end for it to be found and\n  then a \"./tgt\" submodule path will fail. So I had to do a \"../tgt\" as\n  path for submodule. When you clone as above all is fine but if you clone\n  with out the \"/.git\" the server will be smart enough to find your tree\n  by automatically appending the \"/.git\" directory. But the submodule\n  command is no as smart and fails to try the silently added \"/.git\" directory\n\nIf you already cloned or you have an old tree. You can manually edit the\nosc-osd/.git/config file to:\ndiff -Nurp .git/config.old .git/config\n--- .git/config.old\t2010-09-12 13:24:59.218017002 +0200\n+++ .git/config\t2010-09-12 13:24:44.283784834 +0200\n@@ -5,9 +5,9 @@\n \tlogallrefupdates = true\n [remote \"origin\"]\n \tfetch = +refs/heads/*:refs/remotes/origin/*\n-\turl = git://git.open-osd.org/osc-osd\n+\turl = git://git.open-osd.org/osc-osd/.git\n [branch \"master\"]\n \tremote = origin\n \tmerge = refs/heads/master\n [submodule \"tgt\"]\n-\turl = git://git.open-osd.org/tgt/.git\n+\turl = git://git.open-osd.org/osc-osd/tgt/.git\n\n[If you have an old tree the [submodule \"tgt\"] url\n will be OK but the [remote \"origin\"] url should be fixed\n]\n\nAt the end you will need to do:\n[]$ git remote update\n[]$ git submodule update\n\nAgain Sorry for your trouble. But if I revert to the old way\nthen http:// access will not work at all. This way, I sacrifice git://\nguys a bit but they still have a way to manage. (One solution\nI did not try is having bare trees at server but that will change\nevery one's config files as well)\n\nBoaz\n"}]}