I wrote:
> So, this bug is about (if we ignore the various other difficulties)
> the fact that dgit doesn't work with submodules.  It is not clear to
> me how it could.  At the very least this is a tricky design problem.
> 
> I'm going to tag the bug wontfix,wishlist for now.  If someone would
> care to do the hard thinking and propose a coherent scheme for how
> dgit should interact with submodules I will of course consider it.

Nowadays, dgit has split view mode.  This makes this problem soluble,
in principe: dgit could convert the supplied git tree, with
submodules, into a new git tree, without.

Each submodules could be resolved by being stripped, or by being
populated (replaced by the tree object of the gitlink commit).  In the
latter case the objects would have to be available.

I need to do some tests to discover what happens if you have a
.gitmodules file with no corresponding gitlink commits.  If that does
not work properly then dgit will have to delete the .gitmodules file
in a patch, I think.  Which is also awkward.


There will have to be a way to control what to do with submodules.

Should there be in-tree options in debian/ ?  dgit normally doesn't
look in debian/ to decide what to do but this may merit an excuse
given the submodule-wantedness is a property (per submodule) of the
with-submodule git-tree-object with debian/ directory, not of the
branch or the repo or the user.

The natural place to control this would be the .gitmodules file but
that would involve patching it.

So maybe:

  debian/source/dgit-gitmodules

    contains one per line possibly-negated-with-! glob patterns
    specifying matching <name>s (see gitmodules(5) which should be
    included or excluded

    it is an error for a submodule to not be dealt with

    things listed which are not submodules are ignored
    (so the processing is idempotent)


I may implement stripping before I implement filling in.

Ian.

-- 
Ian Jackson <ijack...@chiark.greenend.org.uk>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

Reply via email to