{"thread":{"id":"31389","subject":"dangling submodule references after rebase","startedAt":"2012-08-30T09:56:52Z","lastAt":"2012-08-30T09:56:52Z","messageCount":1,"participants":["Stijn Souffriau"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"198091","messageId":"503F38E4.1010108@essensium.com","threadId":"31389","inReplyTo":null,"subject":"dangling submodule references after rebase","fromName":"Stijn Souffriau","fromEmail":"stijn.souffriau@essensium.com","sentAt":"2012-08-30T09:56:52Z","receivedAt":"2012-08-30T09:56:52Z","isPatch":false,"sender":{"key":"stijn.souffriau@essensium.com","avatar":null},"body":"Hi all,\n\nI am using a repository that has a sub module which is being committed \nto frequently by myself as well as others. Because of the heavy \nconcurrent development I need to do a lot of rebasing. Since the sub \nmodule commit hashes referenced by the parent repository can become \ndangling as a result of rebasing the sub module I am required to do lots \nof manual \"fixing\" of the references in the parent repository using an \ninteractive rebase. This is a tedious, error-prone procedure which I \nwould like to automate.\n\nI was wondering if anyone has thought about solving this problem yet in \nthe past and what might be a good solution?\n\nI was thinking something along the lines of extending the add and commit \ncommands so that a parent repository would signal to the sub modules \nthat it's index or some if it's commits reference certain sub module \ncommits; and also the rebase command so that it would update the parent \nrepository commits with new hashes using the information stored by the \nadd or commit commands. The procedure would have to be made recursive \nbecause changing commits in the parent repository might also require \nchanging commits in it's parent repository as well.\n\nI'm still no quite sure for which sub module rebase operations the \nreferencing parent repository commits would actually have to be \n\"updated\". The reason being that the rebased commits might still be \nreferenced by another branch and so they might continue to exist after \nthe rebase which raises the question if the parent repository commits \nneed to be udated or not. I think this question would have to be \nanswered by the add and commit commands which would also have to specify \na referenced branch in addition to referenced commits so that the parent \nrepo commits would only have to be updated if the commits on this branch \nare rebased. By default this could be the branch checked out in the sub \nmodule at the time the referencing commit was made.\n\nFor obvious reasons this should only be done for newly made, unpushed \nand unpulled commits in the repository. However, it might be interesting \nto also enable people to manually bind a parent repo commits to a \nsubmodule branch so that the commits in this parent repo branch are \nupdated when the sub module branch is rebased.\n\nI would like see this feature end up in the mainline and so I'm very \ninterested in your opinions.\n\nThanks,\n\nStijn\n"}]}