From 517be08472f760983d9622f04ef86e674202edec Mon Sep 17 00:00:00 2001 From: Lennart Klein Date: Fri, 15 Mar 2024 08:20:33 -0700 Subject: [PATCH 1/2] removing the unused credentials argument from the GitTools.fetch function --- src/GitTools.jl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/GitTools.jl b/src/GitTools.jl index d1d6551ebc..e627211b1b 100644 --- a/src/GitTools.jl +++ b/src/GitTools.jl @@ -137,7 +137,7 @@ function clone(io::IO, url, source_path; header=nothing, credentials=nothing, kw end end -function fetch(io::IO, repo::LibGit2.GitRepo, remoteurl=nothing; header=nothing, credentials=nothing, refspecs=[""], kwargs...) +function fetch(io::IO, repo::LibGit2.GitRepo, remoteurl=nothing; header=nothing, refspecs=[""], kwargs...) if remoteurl === nothing remoteurl = LibGit2.with(LibGit2.get(LibGit2.GitRemote, repo, "origin")) do remote LibGit2.url(remote) @@ -159,9 +159,6 @@ function fetch(io::IO, repo::LibGit2.GitRepo, remoteurl=nothing; header=nothing, LibGit2.Callbacks() end fancyprint && start_progress(io, bar) - if credentials === nothing - credentials = LibGit2.CachedCredentials() - end try if use_cli_git() let remoteurl=remoteurl @@ -185,7 +182,6 @@ function fetch(io::IO, repo::LibGit2.GitRepo, remoteurl=nothing; header=nothing, Pkg.Types.pkgerror("failed to fetch from $(remoteurl), error: $err") end finally - Base.shred!(credentials) fancyprint && end_progress(io, bar) end end From 129f86c87a1bbe89afe4592c5448cee507f22209 Mon Sep 17 00:00:00 2001 From: Lennart Klein Date: Fri, 15 Mar 2024 08:21:28 -0700 Subject: [PATCH 2/2] Changing the header of the cloning progress bar from Fetching to Cloning --- src/GitTools.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitTools.jl b/src/GitTools.jl index e627211b1b..0c3bbada2b 100644 --- a/src/GitTools.jl +++ b/src/GitTools.jl @@ -91,7 +91,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) callbacks = if fancyprint LibGit2.Callbacks(