mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 16:45:49 +00:00
Add API to get path to index file
This commit is contained in:
parent
4535f04409
commit
41f1f9d732
@ -239,6 +239,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
|
||||
*
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user