Skip to content

Commit

Permalink
Support LibGit2 ABI for 1.4.0 and later
Browse files Browse the repository at this point in the history
Partial backport of #45411

(cherry picked from commit 44bdf6b)
  • Loading branch information
fxcoudert authored and KristofferC committed Sep 16, 2022
1 parent cc2b7c5 commit d336126
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stdlib/LibGit2/src/consts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ const RESET_HARD = Cint(3) # MIXED plus changes in working tree discarded
REBASE_OPERATION_FIXUP = Cint(4),
REBASE_OPERATION_EXEC = Cint(5))

# git_remote_redirect_t
const GIT_REMOTE_REDIRECT_NONE = Cint(0)
const GIT_REMOTE_REDIRECT_INITIAL = Cint(1)
const GIT_REMOTE_REDIRECT_ALL = Cint(2)

# fetch_prune
const FETCH_PRUNE_UNSPECIFIED = Cint(0)
const FETCH_PRUNE = Cint(1)
Expand Down
6 changes: 6 additions & 0 deletions stdlib/LibGit2/src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ The fields represent:
@static if LibGit2.VERSION >= v"0.25.0"
proxy_opts::ProxyOptions = ProxyOptions()
end
@static if LibGit2.VERSION >= v"1.4.0"
follow_redirects::Cint = Consts.GIT_REMOTE_REDIRECT_INITIAL
end
@static if LibGit2.VERSION >= v"0.24.0"
custom_headers::StrArrayStruct = StrArrayStruct()
end
Expand Down Expand Up @@ -677,6 +680,9 @@ The fields represent:
@static if LibGit2.VERSION >= v"0.25.0"
proxy_opts::ProxyOptions = ProxyOptions()
end
@static if LibGit2.VERSION >= v"1.4.0"
follow_redirects::Cint = Consts.GIT_REMOTE_REDIRECT_INITIAL
end
@static if LibGit2.VERSION >= v"0.24.0"
custom_headers::StrArrayStruct = StrArrayStruct()
end
Expand Down

0 comments on commit d336126

Please sign in to comment.