The sources_manager_spec parses the output from the git command, but it looks like that has changed in a recent version of git.
This output seems to have changed from Already up-to-date to Current branch master is up to date. sometime before git 1.9.0. This only affects the spec, not the actual lib code.
Current branch master is up to date.
@segiddins suggested we check the return code from git. I'd have to verify that, but it sounds like a good idea.
Cannot reproduce this with either the git from Xcode 5.1 or latest from brew. Which version are you using exactly?
$ git --version
git version 220.127.116.11 (Apple Git-48)
$ git pull
$ /usr/local/bin/git --version
git version 1.9.1
$ git pull
@neonichu I'm using the git 1.9.0 via homebrew, but I figured out that it's not the version that makes the difference. I have git configured to rebase on a pull, and the output of a rebase command is different than the output of a pull command.
Here's the relevant snippet from the CocoaPods/.git/config file:
remote = origin
merge = refs/heads/master
rebase = true
That's true for devs who set a global config for branch.autosetuprebase=always and possibly pull.rebase=true, which you can see with git config --global -l
git config --global -l
Issue has been confirmed by @neonichu
Thinking maybe the spec could be changed to disable that option for the test repo it uses.
Can't we just check for /up-?to-?date/? That should do the trick for now
@irrationalfab Other possibility would be explicitly adding --no-rebase to lib/cocoapods/sources_manager.rb, line 155, so that it ignores any git global config for updating spec repos?
Actually that sounds like the best solution: git pull --no-rebase --no-commit
git pull --no-rebase --no-commit
@neonichu closed this issue with pull request CocoaPods/CocoaPods#1978