{"thread":{"id":"54855","subject":"Git fetch failure in submodule if deeper submodule pointer updated","startedAt":"2020-12-19T14:44:33Z","lastAt":"2020-12-21T04:44:46Z","messageCount":2,"participants":["Yngve N. Pettersen","Philippe Blain"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"412642","messageId":"op.0vvmwohypvqxoc@damia","threadId":"54855","inReplyTo":null,"subject":"Git fetch failure in submodule if deeper submodule pointer updated","fromName":"Yngve N. Pettersen","fromEmail":"yngve@vivaldi.com","sentAt":"2020-12-19T14:37:26Z","receivedAt":"2020-12-19T14:44:33Z","isPatch":false,"sender":{"key":"yngve@vivaldi.com","avatar":null},"body":"Hello all,\n\nRecently we encountered a git fetch issue similar to the one I have  \nreported earlier, <https://marc.info/?l=git&m=158979416620251&w=2>, which  \nAFAICT has not yet been fixed.\n\nIn this case we had checked out a submodule, but not the submodule(s)  \nbelow it.\n\nThe full submodule chain was like this:\n\n   top->middle->bottom\n\nThe actual checkout was\n\n   top->middle\n\nBecause only \"middle\" was needed for the cron job script used to push  \nupdates to \"top\" and \"middle\", \"bottom\" was never checked out (and it  \nshould not be necessary to do so, either).\n\nWhen the pointer to \"bottom\" was recently updated in \"middle\", the cron  \njob failed, because Git \"could not access submodule bottom\".\n\nAs I said in my earlier report, this kind of issues should, at most, only  \ntrigger a warning, not a fatal error.\n\n\nThe Git version on the system is Git v2.25.1 (Ubuntu 20.4)\n\nThis problem is not occuring in Git v2.17 on Windows.\n\nAttached is a zipfile with a script that reproduces the problem.\n\n\n\n-- \nSincerely,\nYngve N. Pettersen\nVivaldi Technologies AS"},{"id":"412687","messageId":"d1fcf5ed-9dea-9721-55da-a3d85a9916d8@gmail.com","threadId":"54855","inReplyTo":"op.0vvmwohypvqxoc@damia","subject":"Re: Git fetch failure in submodule if deeper submodule pointer updated","fromName":"Philippe Blain","fromEmail":"levraiphilippeblain@gmail.com","sentAt":"2020-12-21T01:08:47Z","receivedAt":"2020-12-21T04:44:46Z","isPatch":false,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"Hello Yngve,\n\nLe 2020-12-19 à 09:37, Yngve N. Pettersen a écrit :\n> Hello all,\n> \n> Recently we encountered a git fetch issue similar to the one I have reported earlier, <https://marc.info/?l=git&m=158979416620251&w=2>, which AFAICT has not yet been fixed.\n\nRegarding your earlier report, I don't think it has been fixed either.\nThe fact is that I don't think any full-time contributor to Git works\non submodules much these days, so issues like this one, that need design-level\ndiscussions to be fixed, often take more time to get fixed, if they ever are.\nNow on to your new report:\n\n> \n> In this case we had checked out a submodule, but not the submodule(s) below it.\n> \n> The full submodule chain was like this:\n> \n>    top->middle->bottom\n> \n> The actual checkout was\n> \n>    top->middle\n> \n> Because only \"middle\" was needed for the cron job script used to push updates to \"top\" and \"middle\", \"bottom\" was never checked out (and it should not be necessary to do so, either).\n> \n> When the pointer to \"bottom\" was recently updated in \"middle\", the cron job failed, because Git \"could not access submodule bottom\".\n> \n> As I said in my earlier report, this kind of issues should, at most, only trigger a warning, not a fatal error.\n> \n> \n> The Git version on the system is Git v2.25.1 (Ubuntu 20.4)\n> \n> This problem is not occuring in Git v2.17 on Windows.\n> \n> Attached is a zipfile with a script that reproduces the problem.\n\nThanks for the report and the reproducer. This bug was in fact reported and fixed\nearlier this month [1] (full threads: [2], [3]). The patch series is currently cooking\nin the 'next' branch [4]. You can check out just the fix from [5]. I don't think\nit's going to make it to Git 2.30, but it should be in 2.31.\n\nCheers,\n\nPhilippe.\n\n[1] https://lore.kernel.org/git/20201209105844.7019-1-peter.kaestle@nokia.com/\n[2] https://lore.kernel.org/git/CAN0XMOLiS_8JZKF_wW70BvRRxkDHyUoa=Z3ODtB_Bd6f5Y=7JQ@mail.gmail.com/t/#u\n[3] https://lore.kernel.org/git/1604413399-63090-1-git-send-email-peter.kaestle@nokia.com/t/#u\n[4] https://github.com/git/git/blob/730f2a8a60960c30a79e00ebe034836f60befbf0/whats-cooking.txt#L765-L771\n[5] https://github.com/gitster/git/tree/pk/subsub-fetch-fix-take-2\n"}]}