Commit 4d68cc89 authored by Kyle Fuller's avatar Kyle Fuller

Merge pull request #2104 from CocoaPods/git-ff-only

[Sources] Use `git pull` with the `--ff-only` flag
parents 1fcac040 ae26de54
......@@ -54,6 +54,10 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Samuel E. Giddins](https://github.com/segiddins)
[#2003](https://github.com/CocoaPods/CocoaPods/issues/2003)
* Fixes an issue where `pod repo update` may start an un-committed merge.
[Kyle Fuller][kylef]
[#2024](https://github.com/CocoaPods/CocoaPods/issues/2024)
## 0.32.1
##### Bug Fixes
......
......@@ -153,7 +153,7 @@ module Pod
UI.section "Updating spec repo `#{source.name}`" do
Dir.chdir(source.data_provider.repo) do
begin
output = git!("pull --no-rebase --no-commit")
output = git!("pull --ff-only")
UI.puts output if show_output && !config.verbose?
rescue Informative => e
raise Informative, 'An error occurred while performing ' \
......
......@@ -116,20 +116,13 @@ module Pod
set_up_test_repo_for_update
SourcesManager.update(test_repo_path.basename.to_s, true)
UI.output.should.match /Already up-to-date/
UI.output.should.match /is up to date/
end
it "is robust against user settings for git repos" do
it "uses the only fast forward git option" do
set_up_test_repo_for_update
SourcesManager.expects(:git!).with() { |options| options.should.match /--no-rebase/ }
SourcesManager.update(test_repo_path.basename.to_s, true)
end
it "doesn't allow merge commits" do
set_up_test_repo_for_update
SourcesManager.expects(:git!).with() { |options| options.should.match /--no-commit/ }
SourcesManager.expects(:git!).with() { |options| options.should.match /--ff-only/ }
SourcesManager.update(test_repo_path.basename.to_s, true)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment