Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
84a85d1b
Commit
84a85d1b
authored
Jul 16, 2014
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clone: should_clone? Of course we should clone. That's not the question
parent
ed99e0b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/clone.c
+4
-4
No files found.
src/clone.c
View file @
84a85d1b
...
@@ -380,7 +380,7 @@ int git_clone__should_clone_local(const char *url_or_path, git_clone_local_t loc
...
@@ -380,7 +380,7 @@ int git_clone__should_clone_local(const char *url_or_path, git_clone_local_t loc
if
(
local
==
GIT_CLONE_NO_LOCAL
)
if
(
local
==
GIT_CLONE_NO_LOCAL
)
return
0
;
return
0
;
if
(
is_url
=
git_path_is_local_file_url
(
url_or_path
)
)
{
if
(
(
is_url
=
git_path_is_local_file_url
(
url_or_path
))
!=
0
)
{
if
(
git_path_fromurl
(
&
fromurl
,
url_or_path
)
<
0
)
{
if
(
git_path_fromurl
(
&
fromurl
,
url_or_path
)
<
0
)
{
is_local
=
-
1
;
is_local
=
-
1
;
goto
done
;
goto
done
;
...
@@ -437,14 +437,14 @@ int git_clone(
...
@@ -437,14 +437,14 @@ int git_clone(
return
error
;
return
error
;
if
(
!
(
error
=
create_and_configure_origin
(
&
origin
,
repo
,
url
,
&
options
)))
{
if
(
!
(
error
=
create_and_configure_origin
(
&
origin
,
repo
,
url
,
&
options
)))
{
int
should_clone
=
git_clone__should_clone_local
(
url
,
options
.
local
);
int
clone_local
=
git_clone__should_clone_local
(
url
,
options
.
local
);
int
link
=
options
.
local
!=
GIT_CLONE_LOCAL_NO_LINKS
;
int
link
=
options
.
local
!=
GIT_CLONE_LOCAL_NO_LINKS
;
if
(
should_clone
==
1
)
if
(
clone_local
==
1
)
error
=
clone_local_into
(
error
=
clone_local_into
(
repo
,
origin
,
&
options
.
checkout_opts
,
repo
,
origin
,
&
options
.
checkout_opts
,
options
.
checkout_branch
,
link
,
options
.
signature
);
options
.
checkout_branch
,
link
,
options
.
signature
);
else
if
(
should_clone
==
0
)
else
if
(
clone_local
==
0
)
error
=
clone_into
(
error
=
clone_into
(
repo
,
origin
,
&
options
.
checkout_opts
,
repo
,
origin
,
&
options
.
checkout_opts
,
options
.
checkout_branch
,
options
.
signature
);
options
.
checkout_branch
,
options
.
signature
);
...
...
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