{"thread":{"id":"16752","subject":"git filter-branch and superproject","startedAt":"2008-12-16T11:56:38Z","lastAt":"2008-12-16T13:01:00Z","messageCount":2,"participants":["Sergio Callegari","Boaz Harrosh"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"98065","messageId":"loom.20081216T114923-354@post.gmane.org","threadId":"16752","inReplyTo":null,"subject":"git filter-branch and superproject","fromName":"Sergio Callegari","fromEmail":"sergio.callegari@gmail.com","sentAt":"2008-12-16T11:56:38Z","receivedAt":"2008-12-16T11:56:38Z","isPatch":false,"sender":{"key":"sergio.callegari@gmail.com","avatar":"https://gravatar.com/avatar/c98f41317e0422c1e630385de0e3970227b8e5ad15f35ba8586066467cc833bc?d=mp&s=160"},"body":"Hi,\n\nonce a sub-project has been rewritten by filter branch, there is a problem with\nreferences in superproject.\n\nThis is obviously a case where something \"has been published\" so filter-branch\nis not a good idea.  However, super-projects are a very special case of\npublication since they might be \"in full control\" of whom did the rewriting of\ntheir submodules.\n\nIs there a way to filter branch the superproject so that whatever commit is\nreferenced that is in refs/original/something in the subproject gets updated to\nthe corresponding rewritten commit (or an error is given if such a\ncorrespondance does not exist)?\n\nNamely, can filter-branch on the subproject deliver a \"commit conversion table\"\nthat can then be fed to a filter-branch in a superproject?  \n"},{"id":"98072","messageId":"4947A68C.1010503@panasas.com","threadId":"16752","inReplyTo":"loom.20081216T114923-354@post.gmane.org","subject":"Re: git filter-branch and superproject","fromName":"Boaz Harrosh","fromEmail":"bharrosh@panasas.com","sentAt":"2008-12-16T13:01:00Z","receivedAt":"2008-12-16T13:01:00Z","isPatch":false,"sender":{"key":"bharrosh@panasas.com","avatar":"https://gravatar.com/avatar/347e426f8ca0409f6891ceeefd4c3c2d8769608382323057efeaa362b4c3dbf3?d=mp&s=160"},"body":"Sergio Callegari wrote:\n> Hi,\n> \n> once a sub-project has been rewritten by filter branch, there is a problem with\n> references in superproject.\n> \n> This is obviously a case where something \"has been published\" so filter-branch\n> is not a good idea.  However, super-projects are a very special case of\n> publication since they might be \"in full control\" of whom did the rewriting of\n> their submodules.\n> \n> Is there a way to filter branch the superproject so that whatever commit is\n> referenced that is in refs/original/something in the subproject gets updated to\n> the corresponding rewritten commit (or an error is given if such a\n> correspondance does not exist)?\n> \n> Namely, can filter-branch on the subproject deliver a \"commit conversion table\"\n> that can then be fed to a filter-branch in a superproject?  \n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n\nIf I recall correctly, submodule was recently enabled to reference\na soft label, like a branch name, instead of an hard UID. Look it up\nin the newest git.\n\nBut your post brings up another concern. The HEAD referenced by the\nsuperproject does not have any hold in the subproject. So if the\nsubproject under-gone a git-gc the reference UID might disappear, as\nin your case. I wish the git-submodule command would create a TAG or BRANCH\nin the subproject of all referenced HEADs, so they will not disappear\nin future maintenance of the subproject tree. (And it could be very\ninformative when viewing in gitweb). The subproject TAG name could, for\nexample, be the commit and date of the superproject's submodule commit.\n\nBoaz\n"}]}