summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-10-15 12:22:10 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2015-10-15 12:22:10 +0200
commit8321596a49ee0a2e09d97538aee0882bd684cb2d (patch)
treeda794f6e75ce68ee4e7e843bff187c85bc57718a /include/git2
parentd5f7aad810b4232da433b94e3ecf658a75bd145c (diff)
parent21515f228b739a3ecd2237bafbba50e8d219d8dd (diff)
downloadlibgit2-8321596a49ee0a2e09d97538aee0882bd684cb2d.tar.gz
Merge pull request #3444 from ethomson/add_preserves_conflict_mode
Preserve modes from a conflict in `git_index_insert`
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/index.h28
1 files changed, 21 insertions, 7 deletions
diff --git a/include/git2/index.h b/include/git2/index.h
index 176ba301e..466765be3 100644
--- a/include/git2/index.h
+++ b/include/git2/index.h
@@ -154,13 +154,27 @@ typedef enum {
GIT_INDEX_ADD_CHECK_PATHSPEC = (1u << 2),
} git_index_add_option_t;
-/**
- * Match any index stage.
- *
- * Some index APIs take a stage to match; pass this value to match
- * any entry matching the path regardless of stage.
- */
-#define GIT_INDEX_STAGE_ANY -1
+typedef enum {
+ /**
+ * Match any index stage.
+ *
+ * Some index APIs take a stage to match; pass this value to match
+ * any entry matching the path regardless of stage.
+ */
+ GIT_INDEX_STAGE_ANY = -1,
+
+ /** A normal staged file in the index. */
+ GIT_INDEX_STAGE_NORMAL = 0,
+
+ /** The ancestor side of a conflict. */
+ GIT_INDEX_STAGE_ANCESTOR = 1,
+
+ /** The "ours" side of a conflict. */
+ GIT_INDEX_STAGE_OURS = 2,
+
+ /** The "theirs" side of a conflict. */
+ GIT_INDEX_STAGE_THEIRS = 3,
+} git_index_stage_t;
/** @name Index File Functions
*