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
41f1f9d7
Commit
41f1f9d7
authored
Jun 27, 2013
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add API to get path to index file
parent
4535f044
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
include/git2/index.h
+8
-0
src/index.c
+6
-0
No files found.
include/git2/index.h
View file @
41f1f9d7
...
...
@@ -240,6 +240,14 @@ GIT_EXTERN(int) git_index_read(git_index *index);
GIT_EXTERN
(
int
)
git_index_write
(
git_index
*
index
);
/**
* Get the full path to the index file on disk.
*
* @param index an existing index object
* @return path to index file or NULL for in-memory index
*/
GIT_EXTERN
(
const
char
*
)
git_index_path
(
git_index
*
index
);
/**
* Read a tree into the index file with stats
*
* The current index contents will be replaced by the specified tree.
...
...
src/index.c
View file @
41f1f9d7
...
...
@@ -516,6 +516,12 @@ int git_index_write(git_index *index)
return
0
;
}
const
char
*
git_index_path
(
git_index
*
index
)
{
assert
(
index
);
return
index
->
index_file_path
;
}
int
git_index_write_tree
(
git_oid
*
oid
,
git_index
*
index
)
{
git_repository
*
repo
;
...
...
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