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
58532ed0
Commit
58532ed0
authored
May 21, 2014
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2373 from kitbellew/fix-clone-into-mirror
Minor fix for cmn/clone-into-mirror.
parents
430866d2
60cdf495
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
src/clone.c
+2
-4
No files found.
src/clone.c
View file @
58532ed0
...
...
@@ -342,7 +342,7 @@ static bool should_checkout(
int
git_clone_into
(
git_repository
*
repo
,
git_remote
*
_remote
,
const
git_checkout_options
*
co_opts
,
const
char
*
branch
,
const
git_signature
*
signature
)
{
int
error
=
0
,
old_fetchhead
;
int
error
;
git_buf
reflog_message
=
GIT_BUF_INIT
;
git_remote
*
remote
;
const
git_remote_callbacks
*
callbacks
;
...
...
@@ -359,13 +359,12 @@ int git_clone_into(git_repository *repo, git_remote *_remote, const git_checkout
callbacks
=
git_remote_get_callbacks
(
_remote
);
if
(
!
giterr__check_version
(
callbacks
,
1
,
"git_remote_callbacks"
)
&&
(
error
=
git_remote_set_callbacks
(
remote
,
git_remote_get_callbacks
(
_remote
)
))
<
0
)
(
error
=
git_remote_set_callbacks
(
remote
,
callbacks
))
<
0
)
goto
cleanup
;
if
((
error
=
git_remote_add_fetch
(
remote
,
"refs/tags/*:refs/tags/*"
))
<
0
)
goto
cleanup
;
old_fetchhead
=
git_remote_update_fetchhead
(
remote
);
git_remote_set_update_fetchhead
(
remote
,
0
);
git_buf_printf
(
&
reflog_message
,
"clone: from %s"
,
git_remote_url
(
remote
));
...
...
@@ -383,7 +382,6 @@ int git_clone_into(git_repository *repo, git_remote *_remote, const git_checkout
error
=
git_checkout_head
(
repo
,
co_opts
);
cleanup:
git_remote_set_update_fetchhead
(
remote
,
old_fetchhead
);
git_remote_free
(
remote
);
git_buf_free
(
&
reflog_message
);
...
...
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