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
7cc3c920
Commit
7cc3c920
authored
Jan 29, 2013
by
John Wiegley
Committed by
Russell Belfer
Apr 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added git_repository_new function
parent
83cc70d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
include/git2/repository.h
+8
-0
src/repository.c
+6
-0
No files found.
include/git2/repository.h
View file @
7cc3c920
...
...
@@ -137,6 +137,14 @@ GIT_EXTERN(int) git_repository_open_ext(
GIT_EXTERN
(
int
)
git_repository_open_bare
(
git_repository
**
out
,
const
char
*
bare_path
);
/**
* Create a new repository with neither backends nor config object
*
* Note that this is only useful if you wish to associate the repository
* with a non-filesystem-backed object database and config store.
*/
GIT_EXTERN
(
int
)
git_repository_new
(
git_repository
**
out
);
/**
* Free a previously allocated repository
*
* Note that after a repository is free'd, all the objects it has spawned
...
...
src/repository.c
View file @
7cc3c920
...
...
@@ -129,6 +129,12 @@ static git_repository *repository_alloc(void)
return
repo
;
}
int
git_repository_new
(
git_repository
**
out
)
{
*
out
=
repository_alloc
();
return
0
;
}
static
int
load_config_data
(
git_repository
*
repo
)
{
int
is_bare
;
...
...
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