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
979f75d8
Commit
979f75d8
authored
May 30, 2013
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refcounting
parent
4e6e2ff2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
src/refdb.c
+3
-3
src/refdb.h
+2
-0
src/refs.c
+3
-0
No files found.
src/refdb.c
View file @
979f75d8
...
@@ -86,7 +86,7 @@ int git_refdb_compress(git_refdb *db)
...
@@ -86,7 +86,7 @@ int git_refdb_compress(git_refdb *db)
return
0
;
return
0
;
}
}
static
void
refdb
_free
(
git_refdb
*
db
)
void
git_refdb_
_free
(
git_refdb
*
db
)
{
{
refdb_free_backend
(
db
);
refdb_free_backend
(
db
);
git__free
(
db
);
git__free
(
db
);
...
@@ -97,7 +97,7 @@ void git_refdb_free(git_refdb *db)
...
@@ -97,7 +97,7 @@ void git_refdb_free(git_refdb *db)
if
(
db
==
NULL
)
if
(
db
==
NULL
)
return
;
return
;
GIT_REFCOUNT_DEC
(
db
,
refdb
_free
);
GIT_REFCOUNT_DEC
(
db
,
git_refdb_
_free
);
}
}
int
git_refdb_exists
(
int
*
exists
,
git_refdb
*
refdb
,
const
char
*
ref_name
)
int
git_refdb_exists
(
int
*
exists
,
git_refdb
*
refdb
,
const
char
*
ref_name
)
...
@@ -161,7 +161,7 @@ int git_refdb_iterator_next_name(const char **out, git_reference_iterator *iter)
...
@@ -161,7 +161,7 @@ int git_refdb_iterator_next_name(const char **out, git_reference_iterator *iter)
void
git_refdb_iterator_free
(
git_reference_iterator
*
iter
)
void
git_refdb_iterator_free
(
git_reference_iterator
*
iter
)
{
{
GIT_REFCOUNT_DEC
(
iter
->
db
,
refdb
_free
);
GIT_REFCOUNT_DEC
(
iter
->
db
,
git_refdb_
_free
);
iter
->
free
(
iter
);
iter
->
free
(
iter
);
}
}
...
...
src/refdb.h
View file @
979f75d8
...
@@ -16,6 +16,8 @@ struct git_refdb {
...
@@ -16,6 +16,8 @@ struct git_refdb {
git_refdb_backend
*
backend
;
git_refdb_backend
*
backend
;
};
};
void
git_refdb__free
(
git_refdb
*
db
);
int
git_refdb_exists
(
int
git_refdb_exists
(
int
*
exists
,
int
*
exists
,
git_refdb
*
refdb
,
git_refdb
*
refdb
,
...
...
src/refs.c
View file @
979f75d8
...
@@ -95,6 +95,9 @@ void git_reference_free(git_reference *reference)
...
@@ -95,6 +95,9 @@ void git_reference_free(git_reference *reference)
if
(
reference
->
type
==
GIT_REF_SYMBOLIC
)
if
(
reference
->
type
==
GIT_REF_SYMBOLIC
)
git__free
(
reference
->
target
.
symbolic
);
git__free
(
reference
->
target
.
symbolic
);
if
(
reference
->
db
)
GIT_REFCOUNT_DEC
(
reference
->
db
,
git_refdb__free
);
git__free
(
reference
);
git__free
(
reference
);
}
}
...
...
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