JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
610 stars 251 forks source link

Unused credential argument in GitTools.fetch #3833

Open lklein-btig opened 4 months ago

lklein-btig commented 4 months ago

https://github.com/JuliaLang/Pkg.jl/blob/a2b8729eabb33c4773bf21f0d7a0ccad8ce76457/src/GitTools.jl#162C1-L164C10

The credentials argument of the GitTools.fetch function has two uses in that function as far as I can tell:

  1. It gets populated with a default, if its nothing.
  2. It gets shredded.

This sounds to me like it could be removed without changing any functionality. I am willing to submit a pull request for that but I wanted to ask something first. Is there a reason for the credential argument existing? Was this code just copied over from the clone method above and never adjusted for the vestigial credentials argument? Or should the credentials argument be passed on to the LibGit2.fetch method? As far as I can tell the argument would be supported by LibGit2.