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
9223b1bc
Commit
9223b1bc
authored
Jul 09, 2012
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quote all URIs given to git. Fixes #383.
parent
5ea0d332
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
git.rb
lib/cocoapods/downloader/git.rb
+9
-5
No files found.
lib/cocoapods/downloader/git.rb
View file @
9223b1bc
...
@@ -30,7 +30,7 @@ module Pod
...
@@ -30,7 +30,7 @@ module Pod
puts
"-> Creating cache git repo (
#{
cache_path
}
)"
if
config
.
verbose?
puts
"-> Creating cache git repo (
#{
cache_path
}
)"
if
config
.
verbose?
cache_path
.
rmtree
if
cache_path
.
exist?
cache_path
.
rmtree
if
cache_path
.
exist?
cache_path
.
mkpath
cache_path
.
mkpath
git
"clone '
#{
url
}
'
#{
cache_path
}
"
clone
(
url
,
cache_path
)
end
end
def
removed_cached_repos_if_needed
def
removed_cached_repos_if_needed
...
@@ -100,7 +100,7 @@ module Pod
...
@@ -100,7 +100,7 @@ module Pod
def
download_head
def
download_head
update_cache
update_cache
git
"clone '
#{
clone_url
}
' '
#{
target_path
}
'"
clone
(
clone_url
,
target_path
)
end
end
def
download_tag
def
download_tag
...
@@ -116,7 +116,7 @@ module Pod
...
@@ -116,7 +116,7 @@ module Pod
def
download_commit
def
download_commit
ensure_ref_exists
(
options
[
:commit
])
ensure_ref_exists
(
options
[
:commit
])
git
"clone '
#{
clone_url
}
' '
#{
target_path
}
'"
clone
(
clone_url
,
target_path
)
Dir
.
chdir
(
target_path
)
do
Dir
.
chdir
(
target_path
)
do
git
"checkout -b activated-pod-commit
#{
options
[
:commit
]
}
"
git
"checkout -b activated-pod-commit
#{
options
[
:commit
]
}
"
end
end
...
@@ -124,14 +124,18 @@ module Pod
...
@@ -124,14 +124,18 @@ module Pod
def
download_branch
def
download_branch
ensure_remote_branch_exists
(
options
[
:branch
])
ensure_remote_branch_exists
(
options
[
:branch
])
git
"clone '
#{
clone_url
}
' '
#{
target_path
}
'"
clone
(
clone_url
,
target_path
)
Dir
.
chdir
(
target_path
)
do
Dir
.
chdir
(
target_path
)
do
git
"remote add upstream
#{
@url
}
"
# we need to add the original url, not the cache url
git
"remote add upstream
'
#{
@url
}
'
"
# we need to add the original url, not the cache url
git
"fetch -q upstream"
# refresh the branches
git
"fetch -q upstream"
# refresh the branches
git
"checkout --track -b activated-pod-commit upstream/
#{
options
[
:branch
]
}
"
# create a new tracking branch
git
"checkout --track -b activated-pod-commit upstream/
#{
options
[
:branch
]
}
"
# create a new tracking branch
puts
"Just downloaded and checked out branch:
#{
options
[
:branch
]
}
from upstream
#{
clone_url
}
"
if
config
.
verbose?
puts
"Just downloaded and checked out branch:
#{
options
[
:branch
]
}
from upstream
#{
clone_url
}
"
if
config
.
verbose?
end
end
end
end
def
clone
(
from
,
to
)
git
"clone '
#{
from
}
' '
#{
to
}
'"
end
end
end
class
GitHub
<
Git
class
GitHub
<
Git
...
...
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