Skip to content

Commit 3806ff5

Browse files
authored
Remove LibGit2 dependency (#2701)
1 parent b504f18 commit 3806ff5

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717

1818
* In Julia v1.12, the queries used by `clear_module!` will now be versioned by world, allowing the deleting of bindings to work correctly. ([#2693])
1919

20+
### Other
21+
22+
* Documenter no longer depends on the LibGit2 standard library. ([#2363], [#2701])
23+
2024
## Version [v1.10.2] - 2025-04-25
2125

2226
### Fixed
@@ -1961,6 +1965,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19611965
[#2344]: https://github.com/JuliaDocs/Documenter.jl/issues/2344
19621966
[#2348]: https://github.com/JuliaDocs/Documenter.jl/issues/2348
19631967
[#2360]: https://github.com/JuliaDocs/Documenter.jl/issues/2360
1968+
[#2363]: https://github.com/JuliaDocs/Documenter.jl/issues/2363
19641969
[#2364]: https://github.com/JuliaDocs/Documenter.jl/issues/2364
19651970
[#2365]: https://github.com/JuliaDocs/Documenter.jl/issues/2365
19661971
[#2366]: https://github.com/JuliaDocs/Documenter.jl/issues/2366
@@ -1990,7 +1995,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19901995
[#2480]: https://github.com/JuliaDocs/Documenter.jl/issues/2480
19911996
[#2482]: https://github.com/JuliaDocs/Documenter.jl/issues/2482
19921997
[#2485]: https://github.com/JuliaDocs/Documenter.jl/issues/2485
1993-
[#2490]: https://github.com/JuliaDocs/Documenter.jl/pull/2490
1998+
[#2490]: https://github.com/JuliaDocs/Documenter.jl/issues/2490
19941999
[#2496]: https://github.com/JuliaDocs/Documenter.jl/issues/2496
19952000
[#2497]: https://github.com/JuliaDocs/Documenter.jl/issues/2497
19962001
[#2499]: https://github.com/JuliaDocs/Documenter.jl/issues/2499
@@ -2037,9 +2042,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20372042
[#2676]: https://github.com/JuliaDocs/Documenter.jl/issues/2676
20382043
[#2682]: https://github.com/JuliaDocs/Documenter.jl/issues/2682
20392044
[#2685]: https://github.com/JuliaDocs/Documenter.jl/issues/2685
2040-
[#2692]: https://github.com/JuliaDocs/Documenter.jl/pull/2692
2045+
[#2688]: https://github.com/JuliaDocs/Documenter.jl/issues/2688
2046+
[#2692]: https://github.com/JuliaDocs/Documenter.jl/issues/2692
20412047
[#2693]: https://github.com/JuliaDocs/Documenter.jl/issues/2693
20422048
[#2695]: https://github.com/JuliaDocs/Documenter.jl/issues/2695
2049+
[#2701]: https://github.com/JuliaDocs/Documenter.jl/issues/2701
20432050
[JuliaLang/julia#36953]: https://github.com/JuliaLang/julia/issues/36953
20442051
[JuliaLang/julia#38054]: https://github.com/JuliaLang/julia/issues/38054
20452052
[JuliaLang/julia#39841]: https://github.com/JuliaLang/julia/issues/39841

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Git = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
1414
IOCapture = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
1515
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
1616
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
17-
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
1817
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
1918
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
2019
MarkdownAST = "d0879d2d-cac2-40c8-9cee-1863dc0c7391"
@@ -40,7 +39,6 @@ Git = "1"
4039
IOCapture = "0.2"
4140
InteractiveUtils = "1.6"
4241
JSON = "0.19, 0.20, 0.21"
43-
LibGit2 = "1.6"
4442
Logging = "1.6"
4543
Markdown = "1.6"
4644
MarkdownAST = "0.1.1"

src/utilities/utilities.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Base.Meta
22
import Base: isdeprecated, Docs.Binding
33
using DocStringExtensions: SIGNATURES, TYPEDSIGNATURES
4-
import Markdown, MarkdownAST, LibGit2
4+
import Markdown, MarkdownAST
55
import Base64: stringmime
66

77

@@ -431,11 +431,16 @@ Stores the memoized results of [`getremote`](@ref).
431431
"""
432432
const GIT_REMOTE_CACHE = Dict{String, Union{Remotes.Remote, Nothing}}()
433433

434+
# Borrowed from LibGit2 in JuliaLang/julia (MIT)
435+
# https://github.com/JuliaLang/julia/blob/f033630cf08fe20818ee2be7fce2839fce12ec43/stdlib/LibGit2/src/LibGit2.jl#L18-L19
436+
const GITHUB_REGEX =
437+
r"^(?:(?:ssh://)?git@|git://|https://(?:[\w\.\+\-]+@)?)github.com[:/](([^/].+)/(.+?))(?:\.git)?$"i
438+
434439
function parse_remote_url(remote::AbstractString)
435440
# TODO: we only match for GitHub repositories automatically. Could we engineer a
436441
# system where, if there is a user-created Remote, the user could also define a
437442
# matching function here that tries to interpret other URLs?
438-
m = match(LibGit2.GITHUB_REGEX, remote)
443+
m = match(GITHUB_REGEX, remote)
439444
isnothing(m) && return nothing
440445
return Remotes.GitHub(m[2], m[3])
441446
end

0 commit comments

Comments
 (0)