-- gritzko
A submodule splits a project into smaller reusable parts or vendors a dependency; the goal is a seamless recursive experience where clone, checkout, and commit descend into subs by default. The method reuses Beagle's own machinery: a submodule is just another project in the parent's Store, checked out as a secondary worktree at the gitlink path. Git stays byte-exact — a 160000 gitlink and a root .gitmodules blob name the pin and upstream.
/subproject/.parent/.grandparent/gp_branch;get be://store?/parent invokes get be://store?/submodule in a subdir;.be/project/..., i.e. flat at the store level;get, postorder for post);--nosub opts out./child/.parent/parent_branchthen stages that submodule;
get.
A submodule is just another project shard in the parent's store, mounted as a secondary worktree that points back; there is no separate submodule store class. The parent tree's 160000 gitlink pins which commit, the root .gitmodules blob names where to fetch it.
.be/<title>/, same level as the parent's, see Store,.gitmodules URL basename, .git and trailing / stripped (…/libabc.git → libabc).<wt>/<path>/.be (same structure at the root wtlog),.be/<title>/, synthetic branches /<title>/.<parent>/.<grandparent>[/<gp_branch>].