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
48b3ad4f
Commit
48b3ad4f
authored
Aug 01, 2011
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move pack index writing to a public function
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
parent
b7c44096
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
include/git2/indexer.h
+1
-0
src/indexer.c
+1
-7
No files found.
include/git2/indexer.h
View file @
48b3ad4f
...
@@ -15,6 +15,7 @@ typedef struct git_indexer git_indexer;
...
@@ -15,6 +15,7 @@ typedef struct git_indexer git_indexer;
GIT_EXTERN
(
int
)
git_indexer_new
(
git_indexer
**
out
,
const
char
*
packname
);
GIT_EXTERN
(
int
)
git_indexer_new
(
git_indexer
**
out
,
const
char
*
packname
);
GIT_EXTERN
(
int
)
git_indexer_run
(
git_indexer
*
idx
,
git_indexer_stats
*
stats
);
GIT_EXTERN
(
int
)
git_indexer_run
(
git_indexer
*
idx
,
git_indexer_stats
*
stats
);
GIT_EXTERN
(
const
git_oid
*
)
git_indexer_result
(
git_indexer
*
idx
);
GIT_EXTERN
(
const
git_oid
*
)
git_indexer_result
(
git_indexer
*
idx
);
GIT_EXTERN
(
int
)
git_indexer_write
(
git_indexer
*
idx
);
GIT_EXTERN
(
void
)
git_indexer_free
(
git_indexer
*
idx
);
GIT_EXTERN
(
void
)
git_indexer_free
(
git_indexer
*
idx
);
...
...
src/indexer.c
View file @
48b3ad4f
...
@@ -166,7 +166,7 @@ static void index_path(char *path, git_indexer *idx)
...
@@ -166,7 +166,7 @@ static void index_path(char *path, git_indexer *idx)
memcpy
(
ptr
,
suffix
,
STRLEN
(
suffix
));
memcpy
(
ptr
,
suffix
,
STRLEN
(
suffix
));
}
}
static
int
write_index
(
git_indexer
*
idx
)
int
git_indexer_write
(
git_indexer
*
idx
)
{
{
git_mwindow
*
w
=
NULL
;
git_mwindow
*
w
=
NULL
;
int
error
,
namelen
;
int
error
,
namelen
;
...
@@ -358,12 +358,6 @@ int git_indexer_run(git_indexer *idx, git_indexer_stats *stats)
...
@@ -358,12 +358,6 @@ int git_indexer_run(git_indexer *idx, git_indexer_stats *stats)
stats
->
processed
=
++
processed
;
stats
->
processed
=
++
processed
;
}
}
/*
* All's gone well, so let's write the index file.
*/
error
=
write_index
(
idx
);
/* Delete keep file */
cleanup:
cleanup:
git_mwindow_free_all
(
mwf
);
git_mwindow_free_all
(
mwf
);
...
...
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