summaryrefslogtreecommitdiff
path: root/include/git2/index.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-06-27 16:52:00 -0700
committerRussell Belfer <rb@github.com>2013-07-10 12:14:13 -0700
commit41f1f9d732a7cdd50d58948224ca0693a68995dc (patch)
tree78c794d3709e77bddb8ced5a7e728075e50c0d99 /include/git2/index.h
parent4535f04409a9379ace7cdda0b53a62d3cdf20676 (diff)
downloadlibgit2-41f1f9d732a7cdd50d58948224ca0693a68995dc.tar.gz
Add API to get path to index file
Diffstat (limited to 'include/git2/index.h')
-rw-r--r--include/git2/index.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/git2/index.h b/include/git2/index.h
index 1fb77efa3..b44535601 100644
--- a/include/git2/index.h
+++ b/include/git2/index.h
@@ -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.