Skip to content

Commit 0251fbb

Browse files
committed
More missing constants from earlier libgit2 versions
1 parent e94b0a6 commit 0251fbb

File tree

1 file changed

+43
-11
lines changed

1 file changed

+43
-11
lines changed

stdlib/LibGit2/src/consts.jl

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ const REMOTE_ORIGIN = "origin"
1010

1111
# objs
1212
@enum(OBJECT,
13-
OBJ_ANY = -2,
14-
OBJ_BAD = -1,
15-
OBJ_COMMIT = 1,
16-
OBJ_TREE = 2,
17-
OBJ_BLOB = 3,
18-
OBJ_TAG = 4)
13+
OBJ_ANY = -2,
14+
OBJ_BAD = -1,
15+
OBJ_COMMIT = 1,
16+
OBJ_TREE = 2,
17+
OBJ_BLOB = 3,
18+
OBJ_TAG = 4,
19+
OBJ_OFS_DELTA = 6,
20+
OBJ_REF_DELTA = 7)
21+
const OBJ_INVALID = OBJ_BAD
1922

2023
#revwalk
2124
const SORT_NONE = Cint(0)
@@ -26,8 +29,10 @@ const SORT_REVERSE = Cint(1 << 2)
2629
# refs
2730
const REF_INVALID = Cint(0)
2831
const REF_OID = Cint(1)
32+
const REF_DIRECT = REF_OID
2933
const REF_SYMBOLIC = Cint(2)
3034
const REF_LISTALL = REF_OID | REF_SYMBOLIC
35+
const REF_ALL = REF_LISTALL
3136

3237
# blame
3338
const BLAME_NORMAL = Cuint(0)
@@ -36,6 +41,8 @@ const BLAME_TRACK_COPIES_SAME_COMMIT_MOVES = Cuint(1 << 1)
3641
const BLAME_TRACK_COPIES_SAME_COMMIT_COPIES = Cuint(1 << 2)
3742
const BLAME_TRACK_COPIES_ANY_COMMIT_COPIES = Cuint(1 << 3)
3843
const BLAME_FIRST_PARENT = Cuint(1 << 4)
44+
const BLAME_USE_MAILMAP = Cuint(1 << 5)
45+
const BLAME_IGNORE_WHITESPACE = Cuint(1 << 6)
3946

4047
# checkout
4148
const CHECKOUT_NONE = Cuint(0)
@@ -57,6 +64,9 @@ const CHECKOUT_DONT_OVERWRITE_IGNORED = Cuint(1 << 19)
5764
const CHECKOUT_CONFLICT_STYLE_MERGE = Cuint(1 << 20)
5865
const CHECKOUT_CONFLICT_STYLE_DIFF3 = Cuint(1 << 21)
5966
const CHECKOUT_DONT_REMOVE_EXISTING = Cuint(1 << 22)
67+
const CHECKOUT_DONT_WRITE_INDEX = Cuint(1 << 23)
68+
const CHECKOUT_DRY_RUN = Cuint(1 << 24)
69+
const CHECKOUT_CONFLICT_STYLE_ZDIFF3 = Cuint(1 << 25)
6070

6171
const CHECKOUT_UPDATE_SUBMODULES = Cuint(1 << 16)
6272
const CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED = Cuint(1 << 17)
@@ -87,6 +97,11 @@ const DIFF_IGNORE_CASE = Cuint(1 << 10)
8797
const DIFF_DISABLE_PATHSPEC_MATCH = Cuint(1 << 12)
8898
const DIFF_SKIP_BINARY_CHECK = Cuint(1 << 13)
8999
const DIFF_ENABLE_FAST_UNTRACKED_DIRS = Cuint(1 << 14)
100+
const DIFF_UPDATE_INDEX = Cuint(1 << 15)
101+
const DIFF_INCLUDE_UNREADABLE = Cuint(1 << 16)
102+
const DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED = Cuint(1 << 17)
103+
const DIFF_INDENT_HEURISTIC = Cuint(1 << 18)
104+
const DIFF_IGNORE_BLANK_LINES = Cuint(1 << 19)
90105

91106
const DIFF_FORCE_TEXT = Cuint(1 << 20)
92107
const DIFF_FORCE_BINARY = Cuint(1 << 21)
@@ -97,16 +112,20 @@ const DIFF_SHOW_UNTRACKED_CONTENT = Cuint(1 << 25)
97112
const DIFF_SHOW_UNMODIFIED = Cuint(1 << 26)
98113
const DIFF_PATIENCE = Cuint(1 << 28)
99114
const DIFF_MINIMAL = Cuint(1 << 29)
115+
const DIFF_SHOW_BINARY = Cuint(1 << 30)
100116

101117
const DIFF_FLAG_BINARY = Cuint(1 << 0)
102118
const DIFF_FLAG_NOT_BINARY = Cuint(1 << 1)
103119
const DIFF_FLAG_VALID_OID = Cuint(1 << 2)
120+
const DIFF_FLAG_EXISTS = Cuint(1 << 3)
121+
const DIFF_FLAG_VALID_SIZE = Cuint(1 << 4)
104122

105123
const DIFF_FORMAT_PATCH = Cuint(1)
106124
const DIFF_FORMAT_PATCH_HEADER = Cuint(2)
107125
const DIFF_FORMAT_RAW = Cuint(3)
108126
const DIFF_FORMAT_NAME_ONLY = Cuint(4)
109127
const DIFF_FORMAT_NAME_STATUS = Cuint(5)
128+
const DIFF_FORMAT_PATCH_ID = Cuint(6)
110129

111130
@enum(DELTA_STATUS, DELTA_UNMODIFIED = Cint(0),
112131
DELTA_ADDED = Cint(1),
@@ -116,7 +135,9 @@ const DIFF_FORMAT_NAME_STATUS = Cuint(5)
116135
DELTA_COPIED = Cint(5),
117136
DELTA_IGNORED = Cint(6),
118137
DELTA_UNTRACKED = Cint(7),
119-
DELTA_TYPECHANGE = Cint(8))
138+
DELTA_TYPECHANGE = Cint(8),
139+
DELTA_UNREADABLE = Cint(9),
140+
DELTA_CONFLICTED = Cint(10))
120141

121142
# index
122143
const IDXENTRY_NAMEMASK = (0x0fff)
@@ -165,7 +186,8 @@ const INDEX_STAGE_ANY = Cint(-1)
165186
@enum(GIT_MERGE, MERGE_FIND_RENAMES = 1 << 0,
166187
MERGE_FAIL_ON_CONFLICT = 1 << 1,
167188
MERGE_SKIP_REUC = 1 << 2,
168-
MERGE_NO_RECURSIVE = 1 << 3)
189+
MERGE_NO_RECURSIVE = 1 << 3,
190+
MERGE_VIRTUAL_BASE = 1 << 4)
169191

170192
@enum(GIT_MERGE_FILE, MERGE_FILE_DEFAULT = 0, # Defaults
171193
MERGE_FILE_STYLE_MERGE = 1 << 0, # Create standard conflicted merge files
@@ -175,7 +197,13 @@ const INDEX_STAGE_ANY = Cint(-1)
175197
MERGE_FILE_IGNORE_WHITESPACE_CHANGE = 1 << 4, # Ignore changes in amount of whitespace
176198
MERGE_FILE_IGNORE_WHITESPACE_EOL = 1 << 5, # Ignore whitespace at end of line
177199
MERGE_FILE_DIFF_PATIENCE = 1 << 6, # Use the "patience diff" algorithm
178-
MERGE_FILE_DIFF_MINIMAL = 1 << 7) # Take extra time to find minimal diff
200+
MERGE_FILE_DIFF_MINIMAL = 1 << 7, # Take extra time to find minimal diff
201+
MERGE_FILE_STYLE_ZDIFF3 = 1 << 8, # Create zdiff3 ("zealous diff3")-style files
202+
203+
# Do not produce file conflicts when common regions have
204+
# changed; keep the conflict markers in the file and accept
205+
# that as the merge result.
206+
MERGE_FILE_ACCEPT_CONFLICTS = 1 << 9)
179207
""" Option flags for git merge file favoritism.
180208
* `MERGE_FILE_FAVOR_NORMAL`: if both sides of the merge have changes to a section,
181209
make a note of the conflict in the index which `git checkout` will use to create
@@ -316,6 +344,7 @@ const STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED = Cuint(1 << 15)
316344
# certificate types from `enum git_cert_t` in `cert.h`.
317345
const CERT_TYPE_TLS = 1 # GIT_CERT_X509
318346
const CERT_TYPE_SSH = 2 # GIT_CERT_HOSTKEY_LIBSSH2
347+
const CERT_TYPE_STRARRAY = 3 # GIT_CERT_STRARRAY
319348

320349
# certificate callback return values
321350
const PASSTHROUGH = -30
@@ -326,6 +355,7 @@ const CERT_ACCEPT = 0
326355
const CERT_SSH_MD5 = 1 << 0
327356
const CERT_SSH_SHA1 = 1 << 1
328357
const CERT_SSH_SHA256 = 1 << 2
358+
const CERT_SSH_RAW = 1 << 3
329359

330360
# libssh2 known host constants
331361
const LIBSSH2_KNOWNHOST_TYPE_PLAIN = 1
@@ -361,9 +391,11 @@ Option flags for `GitRepo`.
361391
@enum(GIT_REPOSITORY_OPEN, REPOSITORY_OPEN_DEFAULT = 0,
362392
REPOSITORY_OPEN_NO_SEARCH = 1<<0,
363393
REPOSITORY_OPEN_CROSS_FS = 1<<1,
364-
REPOSITORY_OPEN_BARE = 1<<2)
394+
REPOSITORY_OPEN_BARE = 1<<2,
395+
REPOSITORY_OPEN_NO_DOTGIT = 1<<3,
396+
REPOSITORY_OPEN_FROM_ENV = 1<<4)
365397

366-
@enum(GIT_BRANCH, BRANCH_LOCAL = 1, BRANCH_REMOTE = 2)
398+
@enum(GIT_BRANCH, BRANCH_LOCAL = 1, BRANCH_REMOTE = 2, BRANCH_ALL = 1 | 2)
367399

368400
@enum(GIT_FILEMODE, FILEMODE_UNREADABLE = 0o000000,
369401
FILEMODE_TREE = 0o040000,

0 commit comments

Comments
 (0)