Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
a8ee5c10
Commit
a8ee5c10
authored
Sep 13, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Git] Use for the cache.
parent
f6c1349e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
CHANGELOG.md
CHANGELOG.md
+5
-0
git.rb
lib/cocoapods/downloader/git.rb
+9
-5
No files found.
CHANGELOG.md
View file @
a8ee5c10
...
@@ -9,6 +9,11 @@
...
@@ -9,6 +9,11 @@
-
Support for
`header_mappings_dir`
attribute in subspecs.
-
Support for
`header_mappings_dir`
attribute in subspecs.
-
Refactored UI.
-
Refactored UI.
###### Bug fixes
-
Improvements to the git cache that should be more robust.
[
#517
](
https://github.com/CocoaPods/CocoaPods/issues/517
)
## Master
## Master
[
CocoaPods
](
https://github.com/CocoaPods/CocoaPods/compare/0.14.0...master
)
[
CocoaPods
](
https://github.com/CocoaPods/CocoaPods/compare/0.14.0...master
)
...
...
lib/cocoapods/downloader/git.rb
View file @
a8ee5c10
...
@@ -34,7 +34,7 @@ module Pod
...
@@ -34,7 +34,7 @@ module Pod
ui_title
" > Creating cache git repo (
#{
cache_path
}
)"
ui_title
" > Creating cache git repo (
#{
cache_path
}
)"
cache_path
.
rmtree
if
cache_path
.
exist?
cache_path
.
rmtree
if
cache_path
.
exist?
cache_path
.
mkpath
cache_path
.
mkpath
clone
(
url
,
cache_path
)
git!
%Q|clone --mirror "
#{
url
}
" "
#{
cache_path
}
"|
end
end
def
prune_cache
def
prune_cache
...
@@ -77,10 +77,14 @@ module Pod
...
@@ -77,10 +77,14 @@ module Pod
def
update_cache
def
update_cache
ui_title
" > Updating cache git repo (
#{
cache_path
}
)"
ui_title
" > Updating cache git repo (
#{
cache_path
}
)"
Dir
.
chdir
(
cache_path
)
do
Dir
.
chdir
(
cache_path
)
do
git!
"reset --hard HEAD"
if
git
(
"config core.bare"
).
chomp
==
"true"
git!
"clean -d -x -f"
git!
"remote update"
git!
"pull origin master"
else
git!
"fetch --tags"
git!
"reset --hard HEAD"
git!
"clean -d -x -f"
git!
"pull origin master"
git!
"fetch --tags"
end
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment