diff options
author | Russell Belfer <rb@github.com> | 2012-09-28 13:40:02 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-10-09 11:54:01 -0700 |
commit | bc16fd3ebf8727900f2b8c2f44cb14fd03f80bcc (patch) | |
tree | a2038177ca25685b108d768e9cabf0ed57d85963 /include/git2/status.h | |
parent | fade21db0a7a1d535b6352943ecd7b5ae6841e57 (diff) | |
download | libgit2-bc16fd3ebf8727900f2b8c2f44cb14fd03f80bcc.tar.gz |
Introduce status/diff TYPECHANGE flags
When I wrote the diff code, I based it on core git's diff output
which tends to split a type change into an add and a delete. But
core git's status has the notion of a T (typechange) flag for a
file. This introduces that into our status APIs and modifies the
diff code so it can be forced to not split type changes.
Diffstat (limited to 'include/git2/status.h')
-rw-r--r-- | include/git2/status.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/include/git2/status.h b/include/git2/status.h index cc94d7680..725e3ef59 100644 --- a/include/git2/status.h +++ b/include/git2/status.h @@ -19,19 +19,22 @@ */ GIT_BEGIN_DECL -enum { - GIT_STATUS_CURRENT = 0, +typedef enum { + GIT_STATUS_CURRENT = 0, - GIT_STATUS_INDEX_NEW = (1 << 0), - GIT_STATUS_INDEX_MODIFIED = (1 << 1), - GIT_STATUS_INDEX_DELETED = (1 << 2), + GIT_STATUS_INDEX_NEW = (1u << 0), + GIT_STATUS_INDEX_MODIFIED = (1u << 1), + GIT_STATUS_INDEX_DELETED = (1u << 2), + GIT_STATUS_INDEX_RENAMED = (1u << 3), + GIT_STATUS_INDEX_TYPECHANGE = (1u << 4), - GIT_STATUS_WT_NEW = (1 << 3), - GIT_STATUS_WT_MODIFIED = (1 << 4), - GIT_STATUS_WT_DELETED = (1 << 5), + GIT_STATUS_WT_NEW = (1u << 7), + GIT_STATUS_WT_MODIFIED = (1u << 8), + GIT_STATUS_WT_DELETED = (1u << 9), + GIT_STATUS_WT_TYPECHANGE = (1u << 10), - GIT_STATUS_IGNORED = (1 << 6), -}; + GIT_STATUS_IGNORED = (1u << 14), +} git_status_t; /** * Gather file statuses and run a callback for each one. |