|
Boost : |
Subject: Re: [boost] [git][predef] Pull fails
From: Daniel James (dnljms_at_[hidden])
Date: 2014-01-26 14:14:35
On 26 January 2014 17:19, Andrey Semashev <andrey.semashev_at_[hidden]> wrote:
> On Sun, Jan 26, 2014 at 8:23 PM, Andrey Semashev
> <andrey.semashev_at_[hidden]> wrote:
>> Hi,
>>
>> I checked out Boost on my Windows machine quite some time ago and
>> today I tried to update it. I did:
>>
>> git submodule foreach git checkout develop
>> git submodule foreach git pull
>>
>> The last command failed on Boost.Predef (log attached). I did not
>> change it and I don't understand why there is conflict. I tried 'git
>> reset --hard' and pull again, but it fails again the same way.
>>
>> How can I fix it?
Assuming that you haven't made any local commits, you can delete your
local branch (git branch -D develop) or check it out and reset to the
remote branch (git reset --hard origin/develop).
> And I have similar problems with Boost.Build. When I do 'git submodule
> foreach git checkout develop' it checks out something outdated, with
> v2 directory at the top level, saying that it has diverged from
> origin/develop. Doing 'git pull', as it suggests, only brings a bunch
> of conflicts and merges, and a half-merged tree in tools/build.
'develop' is your local branch, which contains an older version. You
can fix it as I wrote above. But it's best not to bother checking out
branches for modules you aren't working on, just let the super project
manage them.
> I can do 'git submodule update' and it does bring tools/build into
> some decent state, without v2 on top, but checking out develop breaks
> it again the same way. How am I supposed to work with develop?
The recommended work flow is to use the master branch of the super
project and any modules you aren't working on. If you really want to
use develop, you can check out the develop branch of the super
project, and use 'git submodule update --init', but I think it's
easier to stick with master.
> PS: I'm really running out of polite words now towards git. This pile
> of... bytes have given me nothing but trouble so far. I'm spending 1.5
> hours now trying just to update the damn local copy, and every update
> command runs for ages, because apparently it authenticates for every
> submodule every time. Who in good will would use this... tool? <sigh>
> I was probably born on another planet.
Is that using 'git submodule foreach ...'? The command for each module
is run in a new process so it can't reuse existing connections. I also
imagine it's extra slow on windows as processes are quite expensive.
'git pull' can be a bit smarter about fetching submodules, and I think
'git submodule update --init' works locally.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk