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
65cb1586
Commit
65cb1586
authored
Aug 01, 2011
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document the indexer calls
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
parent
48b3ad4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
1 deletions
+46
-1
include/git2/indexer.h
+46
-1
No files found.
include/git2/indexer.h
View file @
65cb1586
...
...
@@ -4,6 +4,10 @@
#include "git2/common.h"
#include "git2/oid.h"
/**
* This is passed as the first argument to the callback to allow the
* user to see the progress.
*/
typedef
struct
git_indexer_stats
{
unsigned
int
total
;
unsigned
int
processed
;
...
...
@@ -12,10 +16,51 @@ typedef struct git_indexer_stats {
typedef
struct
git_indexer
git_indexer
;
/**
* Create a new indexer instance
*
* @param out where to store the indexer instance
* @param packname the absolute filename of the packfile to index
*/
GIT_EXTERN
(
int
)
git_indexer_new
(
git_indexer
**
out
,
const
char
*
packname
);
/**
* Iterate over the objects in the packfile and extract the information
*
* Indexing a packfile can be very expensive so this function is
* expected to be run in a worker thread and the stats used to provide
* feedback the user.
*
* @param idx the indexer instance
* @param stats storage for the running state
*/
GIT_EXTERN
(
int
)
git_indexer_run
(
git_indexer
*
idx
,
git_indexer_stats
*
stats
);
GIT_EXTERN
(
const
git_oid
*
)
git_indexer_result
(
git_indexer
*
idx
);
/**
* Write the index file to disk.
*
* The file will be stored as pack-$hash.idx in the same directory as
* the packfile.
*
* @param idx the indexer instance
*/
GIT_EXTERN
(
int
)
git_indexer_write
(
git_indexer
*
idx
);
/**
* Get the packfile's hash
*
* A packfile's name is derived from the sorted hashing of all object
* names. This is only correct after the index has been written to disk.
*
* @param idx the indexer instance
*/
GIT_EXTERN
(
const
git_oid
*
)
git_indexer_hash
(
git_indexer
*
idx
);
/**
* Free the indexer and its resources
*
* @param idx the indexer to free
*/
GIT_EXTERN
(
void
)
git_indexer_free
(
git_indexer
*
idx
);
...
...
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