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?
On Sun, Jan 26, 2014 at 8:23 PM, Andrey Semashev
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?
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. 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? 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.
On 26 January 2014 17:19, Andrey Semashev
On Sun, Jan 26, 2014 at 8:23 PM, Andrey Semashev
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.
On Sun, Jan 26, 2014 at 11:14 PM, Daniel James
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).
Thanks, Daniel, but I eventually re-downloaded the whole Boost repository, which seems to have fixed it. It took another couple of hours though. One question. Wouldn't 'git branch -D develop' modify my history so that it becomes out of sync with the upstream? Boost.Predef is not my library, I wouldn't want any pending changes to be in my local copy.
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.
The problem with 'git submodule update' is that it leaves all submodules in detached state and I can't commit any changes. Also I want to be sure that I'm modifying the latest version from git and not some intermediate version referenced by the supermodule. So I need an equivalent for 'svn update' and 'git submodule foreach git pull' is the closest replacement that I know of.
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 ...'?
Yes.
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.
That's what I'm thinking as well. SVN was really faster with updates. And simpler.
'git pull' can be a bit smarter about fetching submodules, and I think 'git submodule update --init' works locally.
'git pull' (in superproject) doesn't update submodules. I'm not even sure it fetches their history, but I may be wrong. 'git submodule update --init' does fetch submodules when initializing. Not sure if that's the case when the submodule is initialized. But as I said, it leaves the submodules detached, which is not what I want.
Andrey Semashev wrote:
'git pull' (in superproject) doesn't update submodules. I'm not even sure it fetches their history, but I may be wrong.
'git pull' does update the submodule repositories for me. It doesn't update the files; 'git submodule update' does. What I do is: git pull git submodule update --init cd libs\mymodule git checkout develop
On Mon, Jan 27, 2014 at 12:18 AM, Peter Dimov
Andrey Semashev wrote:
'git pull' (in superproject) doesn't update submodules. I'm not even sure it fetches their history, but I may be wrong.
'git pull' does update the submodule repositories for me. It doesn't update the files; 'git submodule update' does. What I do is:
git pull git submodule update --init cd libs\mymodule git checkout develop
So basically, 'git pull' for supermodule does 'git fetch' for submodules? Not quite intuitive, but it can speed up things a little. Thanks. What do you do when you want to update the repository when you have local changes? 'git submodule update' would attempt to roll back mymodule to some detached revision, wouldn't it?
From: lists@pdimov.com To: boost@lists.boost.org Date: Mon, 27 Jan 2014 12:51:40 +0200 Subject: Re: [boost] [git][predef] Pull fails
Andrey Semashev wrote:
What do you do when you want to update the repository when you have local changes?
I guess I don't do that - I always commit first. I'm sure there is a way to do it, but I keep away from any git corner cases. :-)
With git, there are commands which require a 'clean' working directory and stage/index, like rebase and there are commands which will work as long as there are no files with changes that would also have to change due to the command being run, like checkout. If you don't want to have to understand which commands require what, my recommendation would be to always commit changes, frequently.
On Jan 27, 2014, at 3:51 AM, Peter Dimov wrote:
Andrey Semashev wrote:
What do you do when you want to update the repository when you have local changes?
I guess I don't do that - I always commit first. I'm sure there is a way to do it, but I keep away from any git corner cases. :-)
First, stash your local changes: git stash then pull any updates: git pull then apply your local changes back on top of what you pulled: git stash apply Resolve if any conflicts occur during the stash apply. -- Noel
Hey I am trying to get myself involved with the BOOST libraries and start contributing. I found a bug reported on trac, I fixed it and added the file as an attachment. I was curious to know that is this only the way to do it or I should send in patches using pull requests. I would be really glad if someone could guide me with the go abouts of contributing. Thanking you Cheers Shubhangee Verma
________________________________________ From: Boost [boost-bounces@lists.boost.org] on behalf of shubhv@iitk.ac.in [shubhv@iitk.ac.in] Sent: 27 January 2014 07:09 To: boost@lists.boost.org Subject: [boost] Bug Fixing
Hey I am trying to get myself involved with the BOOST libraries and start contributing. I found a bug reported on trac, I fixed it and added the file as an attachment. I was curious to know that is this only the way to do it or I should send in patches using pull requests. I would be really glad if someone could guide me with the go abouts of contributing.
Thanking you
Cheers Shubhangee Verma
Hello. Different libraries are maintained by different people. You don't say which library. It depends on that person what happens next. It is up to the maintainer to implement both the fix and a test. John _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (7)
-
Ahmed Charles
-
Andrey Semashev
-
Belcourt, Kenneth
-
Daniel James
-
Fletcher, John P
-
Peter Dimov
-
shubhv@iitk.ac.in