Entry tags:
Your branch is ahead of 'upstream/develop' by 540 commits.
~/dw (develop)$ git status
# On branch develop
# Your branch is ahead of 'upstream/develop' by 540 commits.
Did we ever figure out what causes this? I have a theory, but I don't really understand...
(Theory: the dwu script does "git pull --ff-only upstream develop" straight from the remote repo into the local develop branch. This doesn't update the local copy of "remotes/upstream/develop" that was created by a "git fetch" sometime in the past. This is what the current branch is being compared to. I have no idea whether this makes sense, and if so how to deal with it...)
# On branch develop
# Your branch is ahead of 'upstream/develop' by 540 commits.
Did we ever figure out what causes this? I have a theory, but I don't really understand...
(Theory: the dwu script does "git pull --ff-only upstream develop" straight from the remote repo into the local develop branch. This doesn't update the local copy of "remotes/upstream/develop" that was created by a "git fetch" sometime in the past. This is what the current branch is being compared to. I have no idea whether this makes sense, and if so how to deal with it...)
no subject
ETA: Aha, okay, git pull --ff-only is not equivalent to fetch + merge, "it doesn't fetch all upstream commits (just the ones for the branch you're working on)". (Unfortunately the reference for this is a StackOverflow question with an agenda, not official documentation, but oh well.)
no subject
I'm unable to actually check anything at present, though, because this hotel's "free wifi" blocks SSH....
no subject
I was right in what was going on, but the "official" script doesn't do this because it does a "git fetch" at the start, thus updating all the remote branches.
Once it's done this, it then does "pull" for develop and master, which means looking at them in the upstream repo again for no particular reason...
Proposal: In the official script, change lines of the form
"git pull --ff-only dreamwidth develop"
to the form
"git merge --ff-only remotes/dreamwidth/develop".
I've just tried this (with dreamwidth substituted with upstream for my setup) and it seems to work, and it should mean hitting github less often.
Also, the "git fetch" should probably be changed to "git fetch -p" so that any branches removed from the dreamwidth github repo are also removed locally.
Asking here rather than just changing it in the wiki it in case there's a reason not to :-)
no subject
If you're still unsure, make a new top-level post to see if anyone else has any objections :)
no subject
no subject
Might those issues have been around the difference that I was describing? (that fetch gets all branches)