summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index a14c01993..3839f0033 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -170,7 +170,7 @@ typedef enum {
/** Include the necessary deflate / delta information so that `git-apply`
* can apply given diff information to binary files.
*/
- GIT_DIFF_SHOW_BINARY = (1u << 30),
+ GIT_DIFF_SHOW_BINARY = (1u << 30)
} git_diff_option_t;
/**
@@ -208,6 +208,7 @@ typedef enum {
GIT_DIFF_FLAG_NOT_BINARY = (1u << 1), /**< file(s) treated as text data */
GIT_DIFF_FLAG_VALID_ID = (1u << 2), /**< `id` value is known correct */
GIT_DIFF_FLAG_EXISTS = (1u << 3), /**< file exists at this side of the delta */
+ GIT_DIFF_FLAG_VALID_SIZE = (1u << 4) /**< file size value is known correct */
} git_diff_flag_t;
/**
@@ -231,7 +232,7 @@ typedef enum {
GIT_DELTA_UNTRACKED = 7, /**< entry is untracked item in workdir */
GIT_DELTA_TYPECHANGE = 8, /**< type of entry changed between old and new */
GIT_DELTA_UNREADABLE = 9, /**< entry is unreadable */
- GIT_DELTA_CONFLICTED = 10, /**< entry in the index is conflicted */
+ GIT_DELTA_CONFLICTED = 10 /**< entry in the index is conflicted */
} git_delta_t;
/**
@@ -497,7 +498,7 @@ typedef enum {
GIT_DIFF_BINARY_LITERAL,
/** The binary data is the delta from one side to the other. */
- GIT_DIFF_BINARY_DELTA,
+ GIT_DIFF_BINARY_DELTA
} git_diff_binary_t;
/** The contents of one of the files in a binary diff. */
@@ -706,7 +707,7 @@ typedef enum {
* GIT_DIFF_INCLUDE_UNMODIFIED flag. If you do not want UNMODIFIED
* records in the final result, pass this flag to have them removed.
*/
- GIT_DIFF_FIND_REMOVE_UNMODIFIED = (1u << 16),
+ GIT_DIFF_FIND_REMOVE_UNMODIFIED = (1u << 16)
} git_diff_find_t;
/**
@@ -758,7 +759,7 @@ typedef struct {
uint16_t copy_threshold;
/**
- * Treshold below which similar files will be split into a delete/add pair.
+ * Threshold below which similar files will be split into a delete/add pair.
* This is equivalent to the last part of the -B option. Defaults to 60.
*/
uint16_t break_rewrite_threshold;
@@ -768,7 +769,7 @@ typedef struct {
*
* This is a little different from the `-l` option from Git because we
* will still process up to this many matches before abandoning the search.
- * Defaults to 200.
+ * Defaults to 1000.
*/
size_t rename_limit;
@@ -831,6 +832,7 @@ GIT_EXTERN(void) git_diff_free(git_diff *diff);
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param new_tree A git_tree object to diff to, or NULL for empty tree.
* @param opts Structure with options to influence diff or NULL for defaults.
+ * @return 0 or an error code.
*/
GIT_EXTERN(int) git_diff_tree_to_tree(
git_diff **diff,
@@ -857,6 +859,7 @@ GIT_EXTERN(int) git_diff_tree_to_tree(
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param index The index to diff with; repo index used if NULL.
* @param opts Structure with options to influence diff or NULL for defaults.
+ * @return 0 or an error code.
*/
GIT_EXTERN(int) git_diff_tree_to_index(
git_diff **diff,
@@ -884,6 +887,7 @@ GIT_EXTERN(int) git_diff_tree_to_index(
* @param repo The repository.
* @param index The index to diff from; repo index used if NULL.
* @param opts Structure with options to influence diff or NULL for defaults.
+ * @return 0 or an error code.
*/
GIT_EXTERN(int) git_diff_index_to_workdir(
git_diff **diff,
@@ -913,6 +917,7 @@ GIT_EXTERN(int) git_diff_index_to_workdir(
* @param repo The repository containing the tree.
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param opts Structure with options to influence diff or NULL for defaults.
+ * @return 0 or an error code.
*/
GIT_EXTERN(int) git_diff_tree_to_workdir(
git_diff **diff,
@@ -932,6 +937,7 @@ GIT_EXTERN(int) git_diff_tree_to_workdir(
* @param repo The repository containing the tree.
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param opts Structure with options to influence diff or NULL for defaults.
+ * @return 0 or an error code.
*/
GIT_EXTERN(int) git_diff_tree_to_workdir_with_index(
git_diff **diff,
@@ -950,6 +956,7 @@ GIT_EXTERN(int) git_diff_tree_to_workdir_with_index(
* @param old_index A git_index object to diff from.
* @param new_index A git_index object to diff to.
* @param opts Structure with options to influence diff or NULL for defaults.
+ * @return 0 or an error code.
*/
GIT_EXTERN(int) git_diff_index_to_index(
git_diff **diff,
@@ -970,6 +977,7 @@ GIT_EXTERN(int) git_diff_index_to_index(
*
* @param onto Diff to merge into.
* @param from Diff to merge.
+ * @return 0 or an error code.
*/
GIT_EXTERN(int) git_diff_merge(
git_diff *onto,
@@ -1107,7 +1115,7 @@ typedef enum {
GIT_DIFF_FORMAT_RAW = 3u, /**< like git diff --raw */
GIT_DIFF_FORMAT_NAME_ONLY = 4u, /**< like git diff --name-only */
GIT_DIFF_FORMAT_NAME_STATUS = 5u, /**< like git diff --name-status */
- GIT_DIFF_FORMAT_PATCH_ID = 6u, /**< git diff as used by git patch-id */
+ GIT_DIFF_FORMAT_PATCH_ID = 6u /**< git diff as used by git patch-id */
} git_diff_format_t;
/**
@@ -1311,13 +1319,13 @@ typedef enum {
GIT_DIFF_STATS_NUMBER = (1u << 2),
/** Extended header information such as creations, renames and mode changes, equivalent of `--summary` */
- GIT_DIFF_STATS_INCLUDE_SUMMARY = (1u << 3),
+ GIT_DIFF_STATS_INCLUDE_SUMMARY = (1u << 3)
} git_diff_stats_format_t;
/**
* Accumulate diff statistics for all patches.
*
- * @param out Structure containg the diff statistics.
+ * @param out Structure containing the diff statistics.
* @param diff A git_diff generated by one of the above functions.
* @return 0 on success; non-zero on error
*/