{"thread":{"id":"28405","subject":"Problem with submodule merge","startedAt":"2011-09-16T12:48:02Z","lastAt":"2011-09-19T07:55:14Z","messageCount":3,"participants":["Nicolas Morey-Chaisemartin","Heiko Voigt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"175644","messageId":"4E734582.6030704@morey-chaisemartin.com","threadId":"28405","inReplyTo":null,"subject":"Problem with submodule merge","fromName":"Nicolas Morey-Chaisemartin","fromEmail":"devel-git@morey-chaisemartin.com","sentAt":"2011-09-16T12:48:02Z","receivedAt":"2011-09-16T12:48:02Z","isPatch":false,"sender":{"key":"devel-git@morey-chaisemartin.com","avatar":"https://avatars.githubusercontent.com/u/108326?v=4"},"body":"Hi,\n\nWe have meet an issue few times at work with submodule merge.\nI'm running git 1.7.7-rc1 build from master on FC15 x86_64 but I've seen the issue on other ditro with older (stable) versions\n\nI still haven't figured out exactly when it happends but here are the symptoms:\n\n1) I commited some updates for a submodule in our integration repo.\n2) I pulled a remote branch of the integration repo which had an update on the same submodule (but different SHAs)\n3) When the merge driver try to find a following commit for the submodule, I get some (sometimes many) error messages about refs that point to invalid objects:\n\n[nmorey@sat:SigmaCToolchain (user/nmorey/dev/0.3.0 *%>)]$ git merge origin/prerelease/0.3-0 \nerror: refs/heads/user/nmorey/master does not point to a valid object!\nerror: refs/remotes/origin/dev/cpp does not point to a valid object!\nerror: refs/remotes/origin/dev/scuk does not point to a valid object!\nerror: refs/remotes/origin/dev/sys_agents does not point to a valid object!\nerror: refs/remotes/origin/user/bbodin/cea does not point to a valid object!\nerror: refs/remotes/origin/user/borgogoz/master does not point to a valid object!\nwarning: Failed to merge submodule db (merge following commits not found)\nAuto-merging db\nCONFLICT (submodule): Merge conflict in db\nAutomatic merge failed; fix conflicts and then commit the result.\n\n\nI checked and the object really exists in the submodule but is in a pack.\n\n>From checking the strace, git looks for a the object in db/.git/objects/... whch does not exists\nAnd from what I could figure it, the issue seems to be coming from  find_pack_entry which does not return 1 so git goes looking for loose object\nand cannot find any (as expected).\nThis is not a big issue as it just outputs errors about refs and does not block the user but it gets quite scary when there are a few hundreds of them !\n\n\nI kept a tarball of the repo so I can provide more info/logs/trace if needed.\n\nNicolas\n"},{"id":"175645","messageId":"20110916145724.GA2782@book.hvoigt.net","threadId":"28405","inReplyTo":"4E734582.6030704@morey-chaisemartin.com","subject":"Re: Problem with submodule merge","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2011-09-16T14:57:25Z","receivedAt":"2011-09-16T14:57:25Z","isPatch":false,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"Hi,\n\nthis looks like you have hit a codepath where the submodules object\ndatabase is not added to the object database. I am not sure why.\n\nCould you try my patch that moves the merge search into a forked process:\n\n3dcb369b allow multiple calls to submodule merge search for the same path\n\nThat should solve the issue as a side effect. Its currently in Junio's\npu branch.\n\nCheers Heiko\n\nOn Fri, Sep 16, 2011 at 02:48:02PM +0200, Nicolas Morey-Chaisemartin wrote:\n> Hi,\n> \n> We have meet an issue few times at work with submodule merge.\n> I'm running git 1.7.7-rc1 build from master on FC15 x86_64 but I've seen the issue on other ditro with older (stable) versions\n> \n> I still haven't figured out exactly when it happends but here are the symptoms:\n> \n> 1) I commited some updates for a submodule in our integration repo.\n> 2) I pulled a remote branch of the integration repo which had an update on the same submodule (but different SHAs)\n> 3) When the merge driver try to find a following commit for the submodule, I get some (sometimes many) error messages about refs that point to invalid objects:\n> \n> [nmorey@sat:SigmaCToolchain (user/nmorey/dev/0.3.0 *%>)]$ git merge origin/prerelease/0.3-0 \n> error: refs/heads/user/nmorey/master does not point to a valid object!\n> error: refs/remotes/origin/dev/cpp does not point to a valid object!\n> error: refs/remotes/origin/dev/scuk does not point to a valid object!\n> error: refs/remotes/origin/dev/sys_agents does not point to a valid object!\n> error: refs/remotes/origin/user/bbodin/cea does not point to a valid object!\n> error: refs/remotes/origin/user/borgogoz/master does not point to a valid object!\n> warning: Failed to merge submodule db (merge following commits not found)\n> Auto-merging db\n> CONFLICT (submodule): Merge conflict in db\n> Automatic merge failed; fix conflicts and then commit the result.\n> \n> \n> I checked and the object really exists in the submodule but is in a pack.\n> \n> >From checking the strace, git looks for a the object in db/.git/objects/... whch does not exists\n> And from what I could figure it, the issue seems to be coming from  find_pack_entry which does not return 1 so git goes looking for loose object\n> and cannot find any (as expected).\n> This is not a big issue as it just outputs errors about refs and does not block the user but it gets quite scary when there are a few hundreds of them !\n> \n> \n> I kept a tarball of the repo so I can provide more info/logs/trace if needed.\n> \n> Nicolas\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"},{"id":"175774","messageId":"4E76F562.30306@morey-chaisemartin.com","threadId":"28405","inReplyTo":"20110916145724.GA2782@book.hvoigt.net","subject":"Re: Problem with submodule merge","fromName":"Nicolas Morey-Chaisemartin","fromEmail":"devel-git@morey-chaisemartin.com","sentAt":"2011-09-19T07:55:14Z","receivedAt":"2011-09-19T07:55:14Z","isPatch":false,"sender":{"key":"devel-git@morey-chaisemartin.com","avatar":"https://avatars.githubusercontent.com/u/108326?v=4"},"body":"Hi,\n\nYou're right, this fixes the issue:\n$ git merge origin/prerelease/0.3-0\nwarning: Failed to merge submodule db (merge following commits not found)\nAuto-merging db\nCONFLICT (submodule): Merge conflict in db\nAutomatic merge failed; fix conflicts and then commit the result.\n\nThanks for the help\n\nNicolas\n\nOn 09/16/2011 04:57 PM, Heiko Voigt wrote:\n> Hi,\n>\n> this looks like you have hit a codepath where the submodules object\n> database is not added to the object database. I am not sure why.\n>\n> Could you try my patch that moves the merge search into a forked process:\n>\n> 3dcb369b allow multiple calls to submodule merge search for the same path\n>\n> That should solve the issue as a side effect. Its currently in Junio's\n> pu branch.\n>\n> Cheers Heiko\n>\n> On Fri, Sep 16, 2011 at 02:48:02PM +0200, Nicolas Morey-Chaisemartin wrote:\n>> Hi,\n>>\n>> We have meet an issue few times at work with submodule merge.\n>> I'm running git 1.7.7-rc1 build from master on FC15 x86_64 but I've seen the issue on other ditro with older (stable) versions\n>>\n>> I still haven't figured out exactly when it happends but here are the symptoms:\n>>\n>> 1) I commited some updates for a submodule in our integration repo.\n>> 2) I pulled a remote branch of the integration repo which had an update on the same submodule (but different SHAs)\n>> 3) When the merge driver try to find a following commit for the submodule, I get some (sometimes many) error messages about refs that point to invalid objects:\n>>\n>> [nmorey@sat:SigmaCToolchain (user/nmorey/dev/0.3.0 *%>)]$ git merge origin/prerelease/0.3-0 \n>> error: refs/heads/user/nmorey/master does not point to a valid object!\n>> error: refs/remotes/origin/dev/cpp does not point to a valid object!\n>> error: refs/remotes/origin/dev/scuk does not point to a valid object!\n>> error: refs/remotes/origin/dev/sys_agents does not point to a valid object!\n>> error: refs/remotes/origin/user/bbodin/cea does not point to a valid object!\n>> error: refs/remotes/origin/user/borgogoz/master does not point to a valid object!\n>> warning: Failed to merge submodule db (merge following commits not found)\n>> Auto-merging db\n>> CONFLICT (submodule): Merge conflict in db\n>> Automatic merge failed; fix conflicts and then commit the result.\n>>\n>>\n>> I checked and the object really exists in the submodule but is in a pack.\n>>\n>> >From checking the strace, git looks for a the object in db/.git/objects/... whch does not exists\n>> And from what I could figure it, the issue seems to be coming from  find_pack_entry which does not return 1 so git goes looking for loose object\n>> and cannot find any (as expected).\n>> This is not a big issue as it just outputs errors about refs and does not block the user but it gets quite scary when there are a few hundreds of them !\n>>\n>>\n>> I kept a tarball of the repo so I can provide more info/logs/trace if needed.\n>>\n>> Nicolas\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"}]}