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
592f466c
Commit
592f466c
authored
Dec 27, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GCC static/non-static compile error
parent
19c3c99c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
23 deletions
+22
-23
src/remote.c
+22
-23
No files found.
src/remote.c
View file @
592f466c
...
...
@@ -130,7 +130,28 @@ on_error:
return
error
;
}
extern
int
ensure_remote_doesnot_exist
(
git_repository
*
repo
,
const
char
*
name
);
static
int
ensure_remote_doesnot_exist
(
git_repository
*
repo
,
const
char
*
name
)
{
int
error
;
git_remote
*
remote
;
error
=
git_remote_load
(
&
remote
,
repo
,
name
);
if
(
error
==
GIT_ENOTFOUND
)
return
0
;
if
(
error
<
0
)
return
error
;
git_remote_free
(
remote
);
giterr_set
(
GITERR_CONFIG
,
"Remote '%s' already exists."
,
name
);
return
GIT_EEXISTS
;
}
int
git_remote_create
(
git_remote
**
out
,
git_repository
*
repo
,
const
char
*
name
,
const
char
*
url
)
{
...
...
@@ -1091,28 +1112,6 @@ void git_remote_set_autotag(git_remote *remote, git_remote_autotag_option_t valu
remote
->
download_tags
=
value
;
}
static
int
ensure_remote_doesnot_exist
(
git_repository
*
repo
,
const
char
*
name
)
{
int
error
;
git_remote
*
remote
;
error
=
git_remote_load
(
&
remote
,
repo
,
name
);
if
(
error
==
GIT_ENOTFOUND
)
return
0
;
if
(
error
<
0
)
return
error
;
git_remote_free
(
remote
);
giterr_set
(
GITERR_CONFIG
,
"Remote '%s' already exists."
,
name
);
return
GIT_EEXISTS
;
}
static
int
rename_remote_config_section
(
git_repository
*
repo
,
const
char
*
old_name
,
...
...
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