[MacPorts] #50708: Base should support fetching git submodules (git submodule update)
MacPorts
noreply at macports.org
Fri Feb 26 01:06:49 PST 2016
#50708: Base should support fetching git submodules (git submodule update)
----------------------+--------------------------------
Reporter: mojca@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 2.3.4
Resolution: | Keywords:
Port: |
----------------------+--------------------------------
Comment (by rjvbertin@…):
The problem I've faced at several occasions is that a simple checkout of a
known commit followed by the standard submodule fetch left me with a
mismatch between the main and the sub modules. So what I do now is a `git
clone --recursive` followed by a `git checkout -q ${git.branch}` in the
working copy. That takes care of the main source tree. In order to get the
known & tested submodule version I need to do some extra work in the post-
fetch. If we ignore the reinplace in the .git/config file which is there
for other reasons, I do `git submodule update --init ; git submodule
update` in the toplevel working copy followed by a series of git commands
in the submodule working copy that leave me with the known commit. It
might be possible to do that in less than the 3 commands I'm using, but if
so I haven't yet found out how.
Part of this complexity may stem from the fact that I've been trying to
support the use of a local working copy as the git, something I clearly
dropped when it became impossible. I probably ought to revisit the
submodule post-fetch code to see if it cannot be simplified, but that's
got a bit too much of a fixing something that ain't broke thing (and the
repo is big so takes a bit too much time to check out repeatedly).
--
Ticket URL: <https://trac.macports.org/ticket/50708#comment:9>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list