Skip to content

Commit cb2a0d4

Browse files
committed
libgit2 1.7.0 support
1 parent 7b9fdf8 commit cb2a0d4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

stdlib/LibGit2/src/consts.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,4 +468,9 @@ Option flags for `GitProxy`.
468468
TRACE_TRACE
469469
end
470470

471+
# The type of object id
472+
@enum(GIT_OID_TYPE,
473+
_OID_DEFAULT = 0,
474+
OID_SHA1 = 1)
475+
471476
end

stdlib/LibGit2/src/types.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
using Base: something
44
import Base.@kwdef
5-
import .Consts: GIT_SUBMODULE_IGNORE, GIT_MERGE_FILE_FAVOR, GIT_MERGE_FILE, GIT_CONFIG
5+
import .Consts: GIT_SUBMODULE_IGNORE, GIT_MERGE_FILE_FAVOR, GIT_MERGE_FILE, GIT_CONFIG, GIT_OID_TYPE
66

77
const OID_RAWSZ = 20
88
const OID_HEXSZ = OID_RAWSZ * 2
@@ -439,6 +439,9 @@ The fields represent:
439439
# options controlling how the diff text is generated
440440
context_lines::UInt32 = UInt32(3)
441441
interhunk_lines::UInt32 = UInt32(0)
442+
@static if LibGit2.VERSION >= v"1.7.0"
443+
oid_type::GIT_OID_TYPE = Consts._OID_DEFAULT
444+
end
442445
id_abbrev::UInt16 = UInt16(7)
443446
max_size::Int64 = Int64(512*1024*1024) #512Mb
444447
old_prefix::Cstring = Cstring(C_NULL)

0 commit comments

Comments
 (0)