summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-05-14 14:00:29 -0400
committerEdward Thomson <ethomson@microsoft.com>2015-05-28 09:44:02 -0400
commit7c948014006e86beaced3e77b61cb0a8ddb0958c (patch)
treef7dc1c8dd846d9ecac6c2f5ff4e5c086f918a670 /include/git2/diff.h
parentd67f270e58942fed5871eca6802d3fa4f290e4f1 (diff)
downloadlibgit2-7c948014006e86beaced3e77b61cb0a8ddb0958c.tar.gz
diff/status: introduce conflicts
When diffing against an index, return a new `GIT_DELTA_CONFLICTED` delta type for items that are conflicted. For a single file path, only one delta will be produced (despite the fact that there are multiple entries in the index). Index iterators now have the (optional) ability to return conflicts in the index. Prior to this change, they would be omitted, and callers (like diff) would omit conflicted index entries entirely.
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index cac3b268a..7505c08c2 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -239,16 +239,17 @@ typedef enum {
* DELETED pairs).
*/
typedef enum {
- GIT_DELTA_UNMODIFIED = 0, /**< no changes */
- GIT_DELTA_ADDED = 1, /**< entry does not exist in old version */
- GIT_DELTA_DELETED = 2, /**< entry does not exist in new version */
- GIT_DELTA_MODIFIED = 3, /**< entry content changed between old and new */
- GIT_DELTA_RENAMED = 4, /**< entry was renamed between old and new */
- GIT_DELTA_COPIED = 5, /**< entry was copied from another old entry */
- GIT_DELTA_IGNORED = 6, /**< entry is ignored item in workdir */
- 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_UNMODIFIED = 0, /**< no changes */
+ GIT_DELTA_ADDED = 1, /**< entry does not exist in old version */
+ GIT_DELTA_DELETED = 2, /**< entry does not exist in new version */
+ GIT_DELTA_MODIFIED = 3, /**< entry content changed between old and new */
+ GIT_DELTA_RENAMED = 4, /**< entry was renamed between old and new */
+ GIT_DELTA_COPIED = 5, /**< entry was copied from another old entry */
+ GIT_DELTA_IGNORED = 6, /**< entry is ignored item in workdir */
+ 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_t;
/**