Submodules on a branch

Ben Gamari ben at
Tue Dec 8 17:40:42 UTC 2015

Simon Peyton Jones <simonpj at> writes:

> ·         I’m on a branch wip/T11067.
Hi Simon!

> · I do a ‘git merge origin/master’, resolve source code conflicts and
> commit
> · Then ‘git submodule update’
> · I have not touched libraries/unix
> · Yet when I say “git submodule” in a different HEAD tree, I get a
> different commit for libraries/unix than in my branch
> Question (sticking plaster): how can I say “Just make my sub-modules match HEAD please”?
I've written a script to do just this [1],

    $ wget
    $ chmod ugo+rx checkout-submodules
    [ensure it's in $PATH]
    $ cd $path_to_ghc
    $ checkout-submodules master
    [a bit of output is produced]
    $ git commit -m "synchronize submodules with master branch"

This should checkout the submodule revisions of the master branch in the
$path_to_ghc tree and commit them.

> Question (cause): how can I ensure that I do update my branch to the
> submodule of HEAD when doing ‘git merge’?
The cause is indeed a bit perplexing. I'll try to reproduce tonight with
the pre-merge state of your T11067 branch.


- Ben


More information about the ghc-devs mailing list