Skip to content

Commit

Permalink
Bump libgit2 to 1.0 (#35233)
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan authored Sep 9, 2020
1 parent 8c3f6e5 commit 3ab576d
Show file tree
Hide file tree
Showing 70 changed files with 49 additions and 80 deletions.
2 changes: 1 addition & 1 deletion deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ LIBSSH2_VER = 1.9.0
LIBSSH2_BB_REL = 1
CURL_VER = 7.66.0
CURL_BB_REL = 1
LIBGIT2_VER = 0.28.5
LIBGIT2_VER = 1.0.1
LIBGIT2_BB_REL = 0
LIBUV_VER = 1.29.1
LIBUV_BB_REL = 9
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion deps/checksums/LibGit2.v0.28.5-0.i686-linux-gnu.tar.gz/md5

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a39e6aded55f15bc3ece658671c99315
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
229bee6d28cd561af7e9d7f96cec430e85308cedc992d6c0ecf0da2ca7f3da117102a0d465da9348c87d99968f28d6fccb0c4dc8c63d8df60480d85b757fd420
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
23069d3105f557b3d549dd33fa2f695e
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fc129a3671512f5f3f1758f015080770d1dbfe9e5f835267e8a473e935a3b68caee10967b190936899b436670a1989983b27b6c3b7b400dfa9a8ab6a204a502c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ffde5b5d4c9edcd8f09dccd2a69efd65
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1be452350b0cb1da8729a29c9a9f76c238c6675ba327e73e7ba85ee3d5f6171518dbf232bc6983c10b41c1505ad9d3960e76215249824dc8538f6ffbd5652d02
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d6a676ba79525923294dfa98f6e6d2da
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
78f1adc43b35848de695fd1a3ccf63028e38e997817c66a86113e66850ec05a39dfa9c994a7ae3296f85d59f50d759c3ff1082ef5e3b08433cd175bfd9f1749a
1 change: 1 addition & 0 deletions deps/checksums/LibGit2.v1.0.1-0.i686-linux-gnu.tar.gz/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c35f04d41788f750415e7679fc5396c6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8b320e57220df522fce8fc74d5e0cd1f88f8e1c380b19ef1bb1ee6aa7dc137d1e19702569169d6cf435605743158cc95fc1a621f80a8f7283f6da305ff302ce2
1 change: 1 addition & 0 deletions deps/checksums/LibGit2.v1.0.1-0.i686-linux-musl.tar.gz/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
051b147a287c99cc9f07251f0be287f8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aaa4651605a0df3459bdd28ae733eb0798498f94493505d20c1dd55fe12e45a026dbd91fa02c1fcc27eddf4128d0c62ca042d3571463add685ad5ec6516a313e
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8b9eb7667b2d28d00f32a7febdd24871
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
63cc2316291104baf852e318ea6d19718b3c44de8129bf516f6b3ae1ab45916e12800722382d1f9fa066def1643cc72282c2b0249636653fae766aafb265cb20
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5be82b37f2b2ab4efb352ae614a13078
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
80107205348fce11d66a073a18e1ba68c96f1e340c0eee4a56d60c24ac3841baca9fe9e258946914ef75444c023d75256af3e9f9f2566d784809f4ca18cd878f
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
96ad7b7dc24971cdff6ff1a01310834a
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b629ac9e1167d13c8010f23427022cb94b5be0baaacbe216b3145d9fd7f67af3b8f817a7c58a67cdc30101c83bf82b9a3369df61e98fdf373035d17e38991b77
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9c20406f23f08356e8d217b16a327164
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
85c953bff1539907ecef5201306b3bba152b64c814c26cd23e78e33f7f202cba67c6d162f63aa188ca6f024fdae47a61b7002676fdf53e2f02db78e057a2a86b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26654010e9216b11f5ded2a062b5b709
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0aa89f698b6140f54f27791ed6f750322e1c996e0b613f68d83251bcc1cc2f95d68431024fbfc45bbaec530a8b5f1c07be1b4adb31ca5a56afcaa64bd80f6ec6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
75b4d5260b09527df92daa4ce26cba05
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b1e40c54afa69383f9e4ad6dfc71eba8b77bd48069c81f510be0f722376fa70c78e00011d6507c39973662f9b9338e151715e2ca903257d33761e7f0a191df31
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
76c12cc5794525bd5686ed9c9dcdd93a
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d378b89e8a3ebae357582b9ddd723cc25c6ada0b0b480bf6904fd0785d14773dbf9e15390763fb67e5d7265704d6b9bc5af9aa15298ec7802f544b32d43e0e75
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0bd38ce98f6ba7b92b4afbd0ae7e3c96
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4bd43d67356f14c9d9a7043e1f3c61c799e844dbbaeaf5250105723c774328b8aaba0fa8ecd2d7bac3ba1a50c2ef9009463e9e159011c75de97a6550b3ba097e

This file was deleted.

This file was deleted.

16 changes: 1 addition & 15 deletions deps/libgit2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ ifeq ($(USE_SYSTEM_MBEDTLS), 0)
$(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: | $(build_prefix)/manifest/mbedtls
endif

ifneq ($(OS),WINNT)
ifeq ($(USE_SYSTEM_CURL), 0)
$(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: | $(build_prefix)/manifest/curl
endif
endif

ifneq ($(USE_BINARYBUILDER_LIBGIT2),1)

LIBGIT2_OPTS := $(CMAKE_COMMON) -DCMAKE_BUILD_TYPE=Release -DTHREADSAFE=ON -DUSE_BUNDLED_ZLIB=ON
Expand All @@ -34,8 +28,6 @@ else
LIBGIT2_OPTS += -DBUILD_CLAR=OFF -DDLLTOOL=`which $(CROSS_COMPILE)dlltool`
LIBGIT2_OPTS += -DCMAKE_FIND_ROOT_PATH=/usr/$(XC_HOST) -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
endif
else
LIBGIT2_OPTS += -DCURL_INCLUDE_DIRS=$(build_includedir) -DCURL_LIBRARIES="curl"
endif

ifneq (,$(findstring $(OS),Linux FreeBSD))
Expand All @@ -49,14 +41,8 @@ $(LIBGIT2_SRC_PATH)/libgit2-agent-nonfatal.patch-applied: $(LIBGIT2_SRC_PATH)/so
patch -p1 -f < $(SRCDIR)/patches/libgit2-agent-nonfatal.patch
echo 1 > $@

$(LIBGIT2_SRC_PATH)/libgit2-case-sensitive.patch-applied: $(LIBGIT2_SRC_PATH)/source-extracted
cd $(LIBGIT2_SRC_PATH) && \
patch -p1 -f < $(SRCDIR)/patches/libgit2-case-sensitive.patch
echo 1 > $@

$(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: \
$(LIBGIT2_SRC_PATH)/libgit2-agent-nonfatal.patch-applied \
$(LIBGIT2_SRC_PATH)/libgit2-case-sensitive.patch-applied \
$(LIBGIT2_SRC_PATH)/libgit2-agent-nonfatal.patch-applied

$(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: $(LIBGIT2_SRC_PATH)/source-extracted
mkdir -p $(dir $@)
Expand Down
4 changes: 2 additions & 2 deletions deps/libgit2.version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LIBGIT2_BRANCH=v0.28.5
LIBGIT2_SHA1=7a2b969d559b83798d93728f24d1729ffc97b717
LIBGIT2_BRANCH=v1.0.1
LIBGIT2_SHA1=0ced29612dacb67eefe0c562a5c1d3aab21cce96
22 changes: 0 additions & 22 deletions deps/patches/libgit2-case-sensitive.patch

This file was deleted.

2 changes: 1 addition & 1 deletion doc/build/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ uses are listed in [`deps/Versions.make`](https://github.com/JuliaLang/julia/blo
- **[GMP]** — GNU multiple precision arithmetic library, needed for `BigInt` support.
- **[MPFR]** — GNU multiple precision floating point library, needed for arbitrary precision floating point (`BigFloat`) support.
- **[libgit2]** — Git linkable library, used by Julia's package manager.
- **[curl]** — libcurl provides download and proxy support for Julia's package manager.
- **[curl]** — libcurl provides download and proxy support.
- **[libssh2]** — library for SSH transport, used by libgit2 for packages with SSH remotes.
- **[mbedtls]** — library used for cryptography and transport layer security, used by libssh2
- **[utf8proc]** — a library for processing UTF-8 encoded Unicode strings.
Expand Down
2 changes: 1 addition & 1 deletion stdlib/LibGit2/src/LibGit2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const REFCOUNT = Threads.Atomic{Int}(0)

function ensure_initialized end

include("error.jl")
include("utils.jl")
include("consts.jl")
include("types.jl")
include("error.jl")
include("signature.jl")
include("oid.jl")
include("reference.jl")
Expand Down
2 changes: 1 addition & 1 deletion stdlib/LibGit2/src/blob.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ id = LibGit2.addblob!(repo, blob_file)
function addblob!(repo::GitRepo, path::AbstractString)
ensure_initialized()
id_ref = Ref{GitHash}()
@check ccall((:git_blob_create_fromdisk, :libgit2), Cint,
@check ccall((:git_blob_create_from_disk, :libgit2), Cint,
(Ptr{GitHash}, Ptr{Cvoid}, Cstring),
id_ref, repo.ptr, path)
return id_ref[]
Expand Down
8 changes: 6 additions & 2 deletions stdlib/LibGit2/src/error.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ export GitError
ECERTIFICATE = Cint(-17), # server certificate is invalid
EAPPLIED = Cint(-18), # patch/merge has already been applied
EPEEL = Cint(-19), # the requested peel operation is not possible
EEOF = Cint(-20), # Unexpted EOF
EEOF = Cint(-20), # unexpected EOF
PASSTHROUGH = Cint(-30), # internal only
ITEROVER = Cint(-31)) # signals end of iteration
ITEROVER = Cint(-31), # signals end of iteration
RETRY = Cint(-32), # internal only
EMISMATCH = Cint(-33), # hashsum mismatch in object
EINDEXDIRTY = Cint(-34), # unsaved changes in the index would be overwritten
EAPPLYFAIL = Cint(-35)) # patch application failed

@enum(Class, None,
NoMemory,
Expand Down
3 changes: 2 additions & 1 deletion stdlib/LibGit2/src/oid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ function GitHash(ptr::Ptr{UInt8})
end
ensure_initialized()
oid_ptr = Ref(GitHash())
ccall((:git_oid_fromraw, :libgit2), Cvoid, (Ptr{GitHash}, Ptr{UInt8}), oid_ptr, ptr)
@check ccall((:git_oid_fromraw, :libgit2), Cint,
(Ptr{GitHash}, Ptr{UInt8}), oid_ptr, ptr)
return oid_ptr[]
end

Expand Down
2 changes: 1 addition & 1 deletion stdlib/LibGit2/src/repository.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end
function cleanup(r::GitRepo)
if r.ptr != C_NULL
ensure_initialized()
ccall((:git_repository__cleanup, :libgit2), Cvoid, (Ptr{Cvoid},), r.ptr)
@check ccall((:git_repository__cleanup, :libgit2), Cint, (Ptr{Cvoid},), r.ptr)
end
end

Expand Down
2 changes: 1 addition & 1 deletion stdlib/LibGit2/src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ end
LibGit2.TransferProgress

Transfer progress information used by the `transfer_progress` remote callback.
Matches the [`git_transfer_progress`](https://libgit2.org/libgit2/#HEAD/type/git_transfer_progress) struct.
Matches the [`git_indexer_progress`](https://libgit2.org/libgit2/#HEAD/type/git_indexer_progress) struct.
"""
@kwdef struct TransferProgress
total_objects::Cuint = Cuint(0)
Expand Down
4 changes: 2 additions & 2 deletions stdlib/LibGit2/src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ function version()
major = Ref{Cint}(0)
minor = Ref{Cint}(0)
patch = Ref{Cint}(0)
ccall((:git_libgit2_version, :libgit2), Cvoid,
(Ref{Cint}, Ref{Cint}, Ref{Cint}), major, minor, patch)
@check ccall((:git_libgit2_version, :libgit2), Cint,
(Ref{Cint}, Ref{Cint}, Ref{Cint}), major, minor, patch)
return VersionNumber(major[], minor[], patch[])
end
const VERSION = version()
Expand Down
2 changes: 1 addition & 1 deletion stdlib/LibGit2/src/walker.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ end
function Base.sort!(w::GitRevWalker; by::Cint = Consts.SORT_NONE, rev::Bool=false)
ensure_initialized()
rev && (by |= Consts.SORT_REVERSE)
ccall((:git_revwalk_sorting, :libgit2), Cvoid, (Ptr{Cvoid}, Cint), w.ptr, by)
@check ccall((:git_revwalk_sorting, :libgit2), Cint, (Ptr{Cvoid}, Cint), w.ptr, by)
return w
end

Expand Down
2 changes: 1 addition & 1 deletion stdlib/LibGit2/test/libgit2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function challenge_prompt(cmd::Cmd, challenges; timeout::Integer=60, debug::Bool
nothing
end

const LIBGIT2_MIN_VER = v"0.23.0"
const LIBGIT2_MIN_VER = v"1.0.0"
const LIBGIT2_HELPER_PATH = joinpath(@__DIR__, "libgit2-helpers.jl")

const KEY_DIR = joinpath(@__DIR__, "keys")
Expand Down

0 comments on commit 3ab576d

Please sign in to comment.