Commit 87d9b2fb authored by Kyle Fuller's avatar Kyle Fuller

Merge pull request #2783 from CocoaPods/remove-git-1.7.5

[Command] Don't check for git >= 1.7.5
parents 8c7e030e 7d17724c
...@@ -19,6 +19,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -19,6 +19,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins) [Samuel Giddins](https://github.com/segiddins)
[#2768](https://github.com/CocoaPods/CocoaPods/issues/2768) [#2768](https://github.com/CocoaPods/CocoaPods/issues/2768)
* We no longer require git version 1.7.5 or greater.
[Kyle Fuller](https://github.com/kylef)
## 0.35.0.rc1 ## 0.35.0.rc1
......
...@@ -41,7 +41,6 @@ module Pod ...@@ -41,7 +41,6 @@ module Pod
def self.run(argv) def self.run(argv)
help! 'You cannot run CocoaPods as root.' if Process.uid == 0 help! 'You cannot run CocoaPods as root.' if Process.uid == 0
verify_git_version!
super(argv) super(argv)
UI.print_warnings UI.print_warnings
...@@ -122,18 +121,5 @@ module Pod ...@@ -122,18 +121,5 @@ module Pod
raise Informative, "No `Podfile.lock' found in the project directory, run `pod install'." raise Informative, "No `Podfile.lock' found in the project directory, run `pod install'."
end end
end end
def self.verify_git_version!
begin
git_version = `git version`.strip
rescue Errno::ENOENT
help! 'CocoaPods requires you to have `git` installed.'
end
git_version = Version.new(git_version.split[2])
if git_version < Pod::Version.new('1.7.5')
help! 'CocoaPods requires git version 1.7.5 or newer. Please update git.'
end
end
end end
end end
...@@ -17,15 +17,5 @@ module Pod ...@@ -17,15 +17,5 @@ module Pod
Process.stubs(:uid).returns(0) Process.stubs(:uid).returns(0)
lambda { Pod::Command.run(['--version']) }.should.raise CLAide::Help lambda { Pod::Command.run(['--version']) }.should.raise CLAide::Help
end end
it "doesn't let you run without git installed" do
Pod::Command.expects(:`).with('git version').raises(Errno::ENOENT)
lambda { Pod::Command.run(['--version']) }.should.raise CLAide::Help
end
it "doesn't let you run with git version < 1.7.5" do
Pod::Command.expects(:`).with('git version').returns('git version 1.7.4.1 (Apple Git-50)')
lambda { Pod::Command.run(['--version']) }.should.raise CLAide::Help
end
end end
end 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