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
87bc689f
Commit
87bc689f
authored
Dec 20, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git_remote_create calls git_remote_save
parent
874dcb25
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
include/git2/remote.h
+4
-2
src/repository.c
+0
-1
No files found.
include/git2/remote.h
View file @
87bc689f
...
@@ -34,7 +34,8 @@ typedef int (*git_remote_rename_problem_cb)(const char *problematic_refspec, voi
...
@@ -34,7 +34,8 @@ typedef int (*git_remote_rename_problem_cb)(const char *problematic_refspec, voi
*/
*/
/**
/**
* Add a remote with the default fetch refspec to the repository's configuration
* Add a remote with the default fetch refspec to the repository's configuration. This
* calls git_remote_save before returning.
*
*
* @param out the resulting remote
* @param out the resulting remote
* @param repo the repository in which to create the remote
* @param repo the repository in which to create the remote
...
@@ -52,7 +53,8 @@ GIT_EXTERN(int) git_remote_create(
...
@@ -52,7 +53,8 @@ GIT_EXTERN(int) git_remote_create(
* Create a remote in memory
* Create a remote in memory
*
*
* Create a remote with the given refspec in memory. You can use
* Create a remote with the given refspec in memory. You can use
* this when you have a URL instead of a remote's name.
* this when you have a URL instead of a remote's name. Note that in-memory
* remotes cannot be converted to persisted remotes.
*
*
* The name, when provided, will be checked for validity.
* The name, when provided, will be checked for validity.
* See `git_tag_create()` for rules about valid names.
* See `git_tag_create()` for rules about valid names.
...
...
src/repository.c
View file @
87bc689f
...
@@ -1141,7 +1141,6 @@ static int repo_init_create_origin(git_repository *repo, const char *url)
...
@@ -1141,7 +1141,6 @@ static int repo_init_create_origin(git_repository *repo, const char *url)
git_remote
*
remote
;
git_remote
*
remote
;
if
(
!
(
error
=
git_remote_create
(
&
remote
,
repo
,
GIT_REMOTE_ORIGIN
,
url
)))
{
if
(
!
(
error
=
git_remote_create
(
&
remote
,
repo
,
GIT_REMOTE_ORIGIN
,
url
)))
{
error
=
git_remote_save
(
remote
);
git_remote_free
(
remote
);
git_remote_free
(
remote
);
}
}
...
...
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