Skip to content

Commit

Permalink
Merge pull request #16319 from wildart/push-opts-fix
Browse files Browse the repository at this point in the history
Fixed `LibGit2.PushOptions` for v0.24.0
  • Loading branch information
wildart committed May 12, 2016
2 parents 2c16e98 + 2e20703 commit 325ac31
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions base/libgit2/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 325ac31

Please sign in to comment.