vendor/libgit2/include/git2/index.h in rugged-1.3.2.3 vs vendor/libgit2/include/git2/index.h in rugged-1.4.2
- old
+ new
@@ -84,11 +84,11 @@
/**
* Flags for index entries
*/
typedef enum {
GIT_INDEX_ENTRY_EXTENDED = (0x4000),
- GIT_INDEX_ENTRY_VALID = (0x8000),
+ GIT_INDEX_ENTRY_VALID = (0x8000)
} git_index_entry_flag_t;
#define GIT_INDEX_ENTRY_STAGE(E) \
(((E)->flags & GIT_INDEX_ENTRY_STAGEMASK) >> GIT_INDEX_ENTRY_STAGESHIFT)
@@ -117,19 +117,19 @@
GIT_INDEX_ENTRY_INTENT_TO_ADD = (1 << 13),
GIT_INDEX_ENTRY_SKIP_WORKTREE = (1 << 14),
GIT_INDEX_ENTRY_EXTENDED_FLAGS = (GIT_INDEX_ENTRY_INTENT_TO_ADD | GIT_INDEX_ENTRY_SKIP_WORKTREE),
- GIT_INDEX_ENTRY_UPTODATE = (1 << 2),
+ GIT_INDEX_ENTRY_UPTODATE = (1 << 2)
} git_index_entry_extended_flag_t;
/** Capabilities of system that affect index actions. */
typedef enum {
GIT_INDEX_CAPABILITY_IGNORE_CASE = 1,
GIT_INDEX_CAPABILITY_NO_FILEMODE = 2,
GIT_INDEX_CAPABILITY_NO_SYMLINKS = 4,
- GIT_INDEX_CAPABILITY_FROM_OWNER = -1,
+ GIT_INDEX_CAPABILITY_FROM_OWNER = -1
} git_index_capability_t;
/** Callback for APIs that add/remove/update files matching pathspec */
typedef int GIT_CALLBACK(git_index_matched_path_cb)(
@@ -138,11 +138,11 @@
/** Flags for APIs that add files matching pathspec */
typedef enum {
GIT_INDEX_ADD_DEFAULT = 0,
GIT_INDEX_ADD_FORCE = (1u << 0),
GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH = (1u << 1),
- GIT_INDEX_ADD_CHECK_PATHSPEC = (1u << 2),
+ GIT_INDEX_ADD_CHECK_PATHSPEC = (1u << 2)
} git_index_add_option_t;
/** Git index stage states */
typedef enum {
/**
@@ -161,11 +161,11 @@
/** The "ours" side of a conflict. */
GIT_INDEX_STAGE_OURS = 2,
/** The "theirs" side of a conflict. */
- GIT_INDEX_STAGE_THEIRS = 3,
+ GIT_INDEX_STAGE_THEIRS = 3
} git_index_stage_t;
/**
* Create a new bare Git index object as a memory representation
* of the Git index file in 'index_path', without a repository
@@ -294,21 +294,24 @@
* @param index an existing index object
* @return path to index file or NULL for in-memory index
*/
GIT_EXTERN(const char *) git_index_path(const git_index *index);
+#ifndef GIT_DEPRECATE_HARD
/**
* Get the checksum of the index
*
* This checksum is the SHA-1 hash over the index file (except the
* last 20 bytes which are the checksum itself). In cases where the
* index does not exist on-disk, it will be zeroed out.
*
+ * @deprecated this function is deprecated with no replacement
* @param index an existing index object
* @return a pointer to the checksum of the index
*/
GIT_EXTERN(const git_oid *) git_index_checksum(git_index *index);
+#endif
/**
* Read a tree into the index file with stats
*
* The current index contents will be replaced by the specified tree.
@@ -489,10 +492,11 @@
* callers to modify the index while iterating without affecting the
* iterator.
*
* @param iterator_out The newly created iterator
* @param index The index to iterate
+ * @return 0 or an error code.
*/
GIT_EXTERN(int) git_index_iterator_new(
git_index_iterator **iterator_out,
git_index *index);
@@ -785,10 +789,11 @@
GIT_EXTERN(int) git_index_conflict_cleanup(git_index *index);
/**
* Determine if the index contains entries representing file conflicts.
*
+ * @param index An existing index object.
* @return 1 if at least one conflict is found, 0 otherwise.
*/
GIT_EXTERN(int) git_index_has_conflicts(const git_index *index);
/**
@@ -809,9 +814,10 @@
* advance the iterator internally to the next value.
*
* @param ancestor_out Pointer to store the ancestor side of the conflict
* @param our_out Pointer to store our side of the conflict
* @param their_out Pointer to store their side of the conflict
+ * @param iterator The conflict iterator.
* @return 0 (no error), GIT_ITEROVER (iteration is done) or an error code
* (negative value)
*/
GIT_EXTERN(int) git_index_conflict_next(
const git_index_entry **ancestor_out,