diff --git a/base/libgit2/types.jl b/base/libgit2/types.jl index 7c73cddc4ad11..b88312d7079a0 100644 --- a/base/libgit2/types.jl +++ b/base/libgit2/types.jl @@ -380,16 +380,32 @@ MergeOptions(; flags::Cint = Cint(0), file_favor, file_flags) -immutable PushOptions - version::Cuint - parallelism::Cint - callbacks::RemoteCallbacks -end -PushOptions(; parallelism::Cint=one(Cint), - callbacks::RemoteCallbacks=RemoteCallbacks()) = - PushOptions(one(Cuint), - parallelism, - callbacks) +if LibGit2.version() >= v"0.24.0" + immutable PushOptions + version::Cuint + parallelism::Cint + callbacks::RemoteCallbacks + custom_headers::StrArrayStruct + end + PushOptions(; parallelism::Cint=one(Cint), + callbacks::RemoteCallbacks=RemoteCallbacks(), + custom_headers::StrArrayStruct = StrArrayStruct()) = + PushOptions(one(Cuint), + parallelism, + callbacks, + custom_headers) +else + immutable PushOptions + version::Cuint + parallelism::Cint + callbacks::RemoteCallbacks + end + PushOptions(; parallelism::Cint=one(Cint), + callbacks::RemoteCallbacks=RemoteCallbacks()) = + PushOptions(one(Cuint), + parallelism, + callbacks) +end immutable IndexTime seconds::Int64