summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/index.h10
-rw-r--r--include/git2/tree.h17
2 files changed, 13 insertions, 14 deletions
diff --git a/include/git2/index.h b/include/git2/index.h
index 195e5b13f..9d1fd17d0 100644
--- a/include/git2/index.h
+++ b/include/git2/index.h
@@ -258,7 +258,7 @@ GIT_EXTERN(int) git_index_write_tree_to(git_oid *out, git_index *index, git_repo
* @param index an existing index object
* @return integer of count of current entries
*/
-GIT_EXTERN(unsigned int) git_index_entrycount(git_index *index);
+GIT_EXTERN(unsigned int) git_index_entrycount(const git_index *index);
/**
* Clear the contents (all the entries) of an index object.
@@ -282,7 +282,8 @@ GIT_EXTERN(void) git_index_clear(git_index *index);
* @param n the position of the entry
* @return a pointer to the entry; NULL if out of bounds
*/
-GIT_EXTERN(const git_index_entry *) git_index_get_byindex(git_index *index, size_t n);
+GIT_EXTERN(const git_index_entry *) git_index_get_byindex(
+ git_index *index, size_t n);
/**
* Get a pointer to one of the entries in the index
@@ -298,7 +299,8 @@ GIT_EXTERN(const git_index_entry *) git_index_get_byindex(git_index *index, size
* @param stage stage to search
* @return a pointer to the entry; NULL if it was not found
*/
-GIT_EXTERN(const git_index_entry *) git_index_get_bypath(git_index *index, const char *path, int stage);
+GIT_EXTERN(const git_index_entry *) git_index_get_bypath(
+ git_index *index, const char *path, int stage);
/**
* Remove an entry from the index
@@ -443,7 +445,7 @@ GIT_EXTERN(void) git_index_conflict_cleanup(git_index *index);
*
* @return 1 if at least one conflict is found, 0 otherwise.
*/
-GIT_EXTERN(int) git_index_has_conflicts(git_index *index);
+GIT_EXTERN(int) git_index_has_conflicts(const git_index *index);
/**@}*/
diff --git a/include/git2/tree.h b/include/git2/tree.h
index 0104ba144..2d3534fab 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -127,7 +127,7 @@ GIT_EXTERN(const git_tree_entry *) git_tree_entry_byindex(
* @return the tree entry; NULL if not found
*/
GIT_EXTERN(const git_tree_entry *) git_tree_entry_byoid(
- git_tree *tree, const git_oid *oid);
+ const git_tree *tree, const git_oid *oid);
/**
* Retrieve a tree entry contained in a tree or in any of its subtrees,
@@ -351,18 +351,15 @@ typedef enum {
} git_treewalk_mode;
/**
- * Traverse the entries in a tree and its subtrees in
- * post or pre order
+ * Traverse the entries in a tree and its subtrees in post or pre order.
*
- * The entries will be traversed in the specified order,
- * children subtrees will be automatically loaded as required,
- * and the `callback` will be called once per entry with
- * the current (relative) root for the entry and the entry
- * data itself.
+ * The entries will be traversed in the specified order, children subtrees
+ * will be automatically loaded as required, and the `callback` will be
+ * called once per entry with the current (relative) root for the entry and
+ * the entry data itself.
*
* If the callback returns a positive value, the passed entry will be
- * skipped on the traversal (in pre mode). A negative value stops the
- * walk.
+ * skipped on the traversal (in pre mode). A negative value stops the walk.
*
* @param tree The tree to walk
* @param mode Traversal mode (pre or post-order)