From db9845f24ac03fe82e879944f77532c1724cb9b7 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 1 Jul 2025 22:34:21 +0200 Subject: [PATCH] fix a header when cloning and use credentials when fetching subsumes #3849 --- src/GitTools.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GitTools.jl b/src/GitTools.jl index a3b2731d9d..bbce2fb95b 100644 --- a/src/GitTools.jl +++ b/src/GitTools.jl @@ -95,7 +95,7 @@ function clone(io::IO, url, source_path; header=nothing, credentials=nothing, kw @assert !isdir(source_path) || isempty(readdir(source_path)) url = normalize_url(url) printpkgstyle(io, :Cloning, header === nothing ? "git-repo `$url`" : header) - bar = MiniProgressBar(header = "Fetching:", color = Base.info_color()) + bar = MiniProgressBar(header = "Cloning:", color = Base.info_color()) fancyprint = can_fancyprint(io) fancyprint && start_progress(io, bar) if credentials === nothing @@ -122,7 +122,7 @@ function clone(io::IO, url, source_path; header=nothing, credentials=nothing, kw LibGit2.Callbacks() end mkpath(source_path) - return LibGit2.clone(url, source_path; callbacks=callbacks, credentials=credentials, kwargs...) + return LibGit2.clone(url, source_path; callbacks, credentials, kwargs...) end catch err rm(source_path; force=true, recursive=true) @@ -177,7 +177,7 @@ function fetch(io::IO, repo::LibGit2.GitRepo, remoteurl=nothing; header=nothing, end end else - return LibGit2.fetch(repo; remoteurl=remoteurl, callbacks=callbacks, refspecs=refspecs, kwargs...) + return LibGit2.fetch(repo; remoteurl, callbacks, credentials, refspecs, kwargs...) end catch err err isa LibGit2.GitError || rethrow()