Re: [PATCH] submodule: allow gitsubmodules to be pointed at tags
- From
Sean Allred <allred.sean@gmail.com>
- Date
- Jun 24, 2024, 13:26 UTC
- Message-ID
- <m0wmmepj3b.fsf@epic96565.epic.com>
- In-Reply-To
- <pull.1703.git.git.1718625706679.gitgitgadget@gmail.com>
@dark0dave: sorry for the duplicate message; mu4e changed its default keybindings recently and I neglected to reply to the list as well...
"dark0dave via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 13 quoted lines
> Intent: Enable git submodules to point at tags, > effectively freezing them > > Context: There is a large repo with 50+ submodules, the goal is > to have some submodules update to HEAD but others to remain fixed. > The update command does this by recursing through > directories. This is very useful, however if an update is run, > all the submodules are updated to HEAD. > > The goals: > - Be able to create a submodule from a fixed tag (complete) > - Be able to run git submodule update, with a flag to either update > or keep the submodule pointed at the supplied tag (complete)
This is an interesting idea, so far as I understand it. I certainly appreciate the desire to freeze your dependencies. I don't use submodules often, but I do want to point out an inherent assumption in your design: that tags don't move.
Tags can move. It's usually impolite, but there can be reasonable use-cases for doing so.
With this in mind, what can go wrong if you have a submodule with a configuration that doesn't necessarily match the tree?
-- Sean Allred