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
b4b935d8
Commit
b4b935d8
authored
Oct 31, 2012
by
Carlos Martín Nieto
Committed by
Carlos Martín Nieto
Nov 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packbuilder: add accessors for the number of total and written objects
parent
3dfed9cb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
include/git2/pack.h
+14
-0
src/pack-objects.c
+10
-0
No files found.
include/git2/pack.h
View file @
b4b935d8
...
...
@@ -88,6 +88,20 @@ GIT_EXTERN(int) git_packbuilder_write(git_packbuilder *pb, const char *file);
GIT_EXTERN
(
int
)
git_packbuilder_foreach
(
git_packbuilder
*
pb
,
int
(
*
cb
)(
void
*
buf
,
size_t
size
,
void
*
data
),
void
*
data
);
/**
* Get the total number of objects the packbuilder will write out
*
* @param pb the packbuilder
*/
GIT_EXTERN
(
uint32_t
)
git_packbuilder_object_count
(
git_packbuilder
*
pb
);
/**
* Get the number of objects the packbuilder has already written out
*
* @param pb the packbuilder
*/
GIT_EXTERN
(
uint32_t
)
git_packbuilder_written
(
git_packbuilder
*
pb
);
/**
* Free the packbuilder and all associated data
*
* @param pb The packbuilder
...
...
src/pack-objects.c
View file @
b4b935d8
...
...
@@ -1292,6 +1292,16 @@ int git_packbuilder_insert_tree(git_packbuilder *pb, const git_oid *oid)
return
0
;
}
uint32_t
git_packbuilder_object_count
(
git_packbuilder
*
pb
)
{
return
pb
->
nr_objects
;
}
uint32_t
git_packbuilder_written
(
git_packbuilder
*
pb
)
{
return
pb
->
nr_written
;
}
void
git_packbuilder_free
(
git_packbuilder
*
pb
)
{
if
(
pb
==
NULL
)
...
...
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