#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 cal@…): Whenever you change the version of the base repository, you need to run `git submodule update`, preferably with the `--recursive` and `--init` flags, just in case there are nested submodules, or submodules have been added/removed. So yes, it is expected behavior that you get a mismatch if you do {{{ git checkout $branch git submodule fetch }}} because you never did a `submodule update`. Fetch operations never change the state of a working copy in git. So for a proper implementation in MacPorts, we need: 1. git clone 2. git checkout $yourbranch_hash_or_tag 3. git submodule update --init --recursive `git clone --recursive` does not buy as anything, because the state of the submodules at our target commit `$yourbranch_hash_or_tag` can be different from origin/master, which is what the recursive clone would give us. We cannot use `git clone -b $branch_or_tag --recursive` either, because that doesn't work for commit hashes. -- Ticket URL: <https://trac.macports.org/ticket/50708#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X