Boost logo

Boost :

Subject: Re: [boost] [git] How the blazes are you supposed to update all the submodules?
From: Cox, Michael (mhcox_at_[hidden])
Date: 2013-12-19 19:29:33


On Thu, Dec 19, 2013 at 6:00 AM, John Maddock <john_at_[hidden]>wrote:

> OK.... so I do a
>
> Git pull
>
> at the top level (note: using TortoiseGit), and I see lots of messages in
> the log indicating which libraries have updates, and judging by the time
> taken they seem to be downloaded (?), but I don't actually see any changes
> in the libraries themselves.

This might help Getting Started with Modular Boost Library
Maintenance<https://svn.boost.org/trac/boost/wiki/StartModMaint>,
although you'll have to translate it to TortoiseGit GUI clicks. As you can
tell from this and other threads, there's a lot of debate about what is the
best way to use git with Boost, so this link is subject to change.

I verified I had the latest TortoiseGit (TG) on my Windows 8 and tried to
do what you want to do.

I don't know how TG works, but if it knows it's out of date, that probably
means it's fetched all the changes into the remote branches, i.e.
refs/remotes/origin/*. You just have to figure out how to get those into
your working directory.

>
> BTW I have every library set explicitly to either "develop" or "master".
>
> If I do a "git pull" on an individual library then the changes do come
> through OK.
>

That should get changes in the refs/remotes/origin/* to refs/heads/* for a
particular repository. I don't see how to pull the latest changes from a
branch for all submodules in TG. It seems like they haven't implemented
the "git submodule foreach" functionality in TG, e.g. the "Git Sync..."
menu item dialog seems like it should have a "Recursive" checkbox for all
the pull/push/submodule update buttons. I also tried the
"TortoiseGit->Submodule Update...", but got an error dialog:

Could not get submodule list.

An error occurred in libgit2. but no message is available.

If you click on OK, you get what looks like the "Submodule Update..."
dialog, but it's in a screwy state. The dialog does have a "Recursive"
checkbox and a "Remote tracking branch" checkbox that looks promising, but
they'll have to fix whatever bug is occurring.

So what's the right way to do this? I assume it's not a "submodule update"
> as that seems to leave everything in a detached head state which I take it
> is a bad idea?

> I'm also seeing a lot of negative comments about Git submodules on the
> web, for example: http://codingkilledthecat.wordpress.com/2012/04/28/why-
> your-company-shouldnt-use-git-submodules/, seems like there's a lot of
> potential to shoot yourself in the foot/head/chest here?
>

That's true of git in general :-), although I've never lost any data.
 Working in your own copy of the git repository frees you to experiment
with it. You just have to worry when you push to a shared repository :-).
 And definitely think twice about using the -f/--force options on some of
the git commands. I've learned the hard way that if you think you have to
force it, you're probably wrong.

You definitely have to grok git, but once you do, you'll never want to go
back to Subversion or anything non-distributed. The way it handles
branches is truly amazing.

Michael

>
> Thanks, John.
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/
> mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk