Skip to content

Commit 874690d

Browse files
KristofferCKristofferC
authored andcommitted
fix a header when cloning and use credentials when fetching (#4286)
(cherry picked from commit ffdb668)
1 parent 1e8938f commit 874690d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GitTools.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function clone(io::IO, url, source_path; header=nothing, credentials=nothing, kw
9595
@assert !isdir(source_path) || isempty(readdir(source_path))
9696
url = normalize_url(url)
9797
printpkgstyle(io, :Cloning, header === nothing ? "git-repo `$url`" : header)
98-
bar = MiniProgressBar(header = "Fetching:", color = Base.info_color())
98+
bar = MiniProgressBar(header = "Cloning:", color = Base.info_color())
9999
fancyprint = can_fancyprint(io)
100100
fancyprint && start_progress(io, bar)
101101
if credentials === nothing
@@ -122,7 +122,7 @@ function clone(io::IO, url, source_path; header=nothing, credentials=nothing, kw
122122
LibGit2.Callbacks()
123123
end
124124
mkpath(source_path)
125-
return LibGit2.clone(url, source_path; callbacks=callbacks, credentials=credentials, kwargs...)
125+
return LibGit2.clone(url, source_path; callbacks, credentials, kwargs...)
126126
end
127127
catch err
128128
rm(source_path; force=true, recursive=true)
@@ -179,7 +179,7 @@ function fetch(io::IO, repo::LibGit2.GitRepo, remoteurl=nothing; header=nothing,
179179
end
180180
end
181181
else
182-
return LibGit2.fetch(repo; remoteurl=remoteurl, callbacks=callbacks, refspecs=refspecs, kwargs...)
182+
return LibGit2.fetch(repo; remoteurl, callbacks, credentials, refspecs, kwargs...)
183183
end
184184
catch err
185185
err isa LibGit2.GitError || rethrow()

0 commit comments

Comments
 (0)