diff options
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/diff.h | 16 | ||||
-rw-r--r-- | include/git2/status.h | 2 | ||||
-rw-r--r-- | include/git2/tree.h | 6 |
3 files changed, 16 insertions, 8 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h index 413de8d98..0e7c02fd0 100644 --- a/include/git2/diff.h +++ b/include/git2/diff.h @@ -75,6 +75,20 @@ enum { }; /** + * What type of change is described by a git_diff_delta? + */ +typedef enum { + GIT_DELTA_UNMODIFIED = 0, + GIT_DELTA_ADDED = 1, + GIT_DELTA_DELETED = 2, + GIT_DELTA_MODIFIED = 3, + GIT_DELTA_RENAMED = 4, + GIT_DELTA_COPIED = 5, + GIT_DELTA_IGNORED = 6, + GIT_DELTA_UNTRACKED = 7 +} git_delta_t; + +/** * Description of one side of a diff. */ typedef struct { @@ -101,7 +115,7 @@ typedef struct { typedef struct { git_diff_file old; git_diff_file new; - git_status_t status; /**< value from tree.h */ + git_delta_t status; unsigned int similarity; /**< for RENAMED and COPIED, value from 0 to 100 */ int binary; } git_diff_delta; diff --git a/include/git2/status.h b/include/git2/status.h index 31823c6c5..5c45dae1e 100644 --- a/include/git2/status.h +++ b/include/git2/status.h @@ -31,7 +31,7 @@ GIT_BEGIN_DECL #define GIT_STATUS_WT_MODIFIED (1 << 4) #define GIT_STATUS_WT_DELETED (1 << 5) -#define GIT_STATUS_WT_IGNORED (1 << 6) +#define GIT_STATUS_IGNORED (1 << 6) /** * Gather file statuses and run a callback for each one. diff --git a/include/git2/tree.h b/include/git2/tree.h index 95be1d305..972c3795c 100644 --- a/include/git2/tree.h +++ b/include/git2/tree.h @@ -314,15 +314,9 @@ enum git_treewalk_mode { GIT_EXTERN(int) git_tree_walk(git_tree *tree, git_treewalk_cb callback, int mode, void *payload); typedef enum { - GIT_STATUS_UNMODIFIED = 0, GIT_STATUS_ADDED = 1, GIT_STATUS_DELETED = 2, GIT_STATUS_MODIFIED = 3, - /* the following will only be generated by git_diff functions */ - GIT_STATUS_RENAMED = 4, - GIT_STATUS_COPIED = 5, - GIT_STATUS_IGNORED = 6, - GIT_STATUS_UNTRACKED = 7 } git_status_t; typedef struct { |