summaryrefslogtreecommitdiff
path: root/index.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2015-10-26 21:44:16 +0100
committerCarlos Martín Nieto <[email protected]>2015-10-26 21:44:16 +0100
commit749963ce55c6391bf7222057b037344a0cb837cf (patch)
treeb0b8d11250139b37a76c6ead494114411c2970dc /index.go
parentc4868aef6c3e22a5c339dea4dd5406bfc0bd095b (diff)
parent367cd8eb9b84538933774befa76c099298c32c81 (diff)
Merge pull request #266 from clns/update-libgit2
[next] Update libgit2 to 821131f
Diffstat (limited to 'index.go')
-rw-r--r--index.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/index.go b/index.go
index 06495b9..1875e32 100644
--- a/index.go
+++ b/index.go
@@ -26,6 +26,24 @@ const (
IndexAddCheckPathspec IndexAddOpts = C.GIT_INDEX_ADD_CHECK_PATHSPEC
)
+type IndexStageOpts int
+
+const (
+ // IndexStageAny matches any index stage.
+ //
+ // Some index APIs take a stage to match; pass this value to match
+ // any entry matching the path regardless of stage.
+ IndexStageAny IndexStageOpts = C.GIT_INDEX_STAGE_ANY
+ // IndexStageNormal is a normal staged file in the index.
+ IndexStageNormal IndexStageOpts = C.GIT_INDEX_STAGE_NORMAL
+ // IndexStageAncestor is the ancestor side of a conflict.
+ IndexStageAncestor IndexStageOpts = C.GIT_INDEX_STAGE_ANCESTOR
+ // IndexStageOurs is the "ours" side of a conflict.
+ IndexStageOurs IndexStageOpts = C.GIT_INDEX_STAGE_OURS
+ // IndexStageTheirs is the "theirs" side of a conflict.
+ IndexStageTheirs IndexStageOpts = C.GIT_INDEX_STAGE_THEIRS
+)
+
type Index struct {
ptr *C.git_index
}