summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-03-01 11:45:00 -0800
committerRussell Belfer <arrbee@arrbee.com>2012-03-02 15:51:55 -0800
commite1bcc19110eb7d540dee92af489440dd2953b5d5 (patch)
treeeb5a3a1db6a7dbdd135faa9845a83c222d2790a1 /include/git2/diff.h
parentc19bc93cef62cf4a638ab42ba9562885b07a68ce (diff)
downloadlibgit2-e1bcc19110eb7d540dee92af489440dd2953b5d5.tar.gz
Revert GIT_STATUS constants to avoid issues
This reverts the changes to the GIT_STATUS constants and adds a new enumeration to describe the type of change in a git_diff_delta. I don't love this solution, but it should prevent strange errors from occurring for now. Eventually, I would like to unify the various status constants, but it needs a larger plan and I just wanted to eliminate this breakage quickly.
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index 413de8d9..0e7c02fd 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;