{"thread":{"id":"54265","subject":"Possible bug with shallow git submodules","startedAt":"2020-09-21T04:11:02Z","lastAt":"2020-09-21T04:11:02Z","messageCount":1,"participants":["Jack Pearson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"406010","messageId":"TL-eiJO9bgDXcADhNSFRNxeW0f_E_j81jXXUbGjW-1Rib26LB8OViFEeH0ptC3i0px33kk3xKghYr4bYiiHuKSFXwMNAUIh7jisIZeVpQBQ=@protonmail.com","threadId":"54265","inReplyTo":null,"subject":"Possible bug with shallow git submodules","fromName":"Jack Pearson","fromEmail":"jackrpearson@protonmail.com","sentAt":"2020-09-21T04:05:18Z","receivedAt":"2020-09-21T04:11:02Z","isPatch":false,"sender":{"key":"jackrpearson@protonmail.com","avatar":null},"body":"When I create a shallow submodule, the submodule doesn't stay shallow after the submodule's remote changes if the submodule is re-fetched as a result of fresh clone, or a result of manually deleting the submodule's .git folder.\n\nDetailed reproduction instructions here:\nhttps://gist.github.com/jpear1/0ffc28e8167d00504fba54d50ec4848d\n\n\nMaybe related is another problem I've noticed with git submodules:\n\nI'm unable to discard commits by moving the tracked commit backwards (with git reset) in a shallow submodule (the .git/modules/<mod-name>/shallow file doesn't update properly).\n\nBasically it seems like the submodule is using the latest shallow \"root\" it can find in the branch's history of gitlinks and not allowing me to use anything but that. I'm not sure if this is really what's going on though.\n\nI go into more detail in an SO post here:\nhttps://stackoverflow.com/questions/63976876\n"}]}