Pkg.GitTools.clone have been changed, and what is the ctx?

Hello,
I have found that the Pkg.GitTools.clone command has been changed without noticing it’s change in the release notes. Although I don’t know this was intentional or not. Anyways, I reported it because This change broke my code. (Maybe I should have used LibGit2.clone but the clone command in Pkg is beautiful :smile:)

And a side note question: What is the ctx anyway?

The method in the Julia 1.4.1:

help?> Pkg.GitTools.clone
  No documentation found.

  Pkg.GitTools.clone is a Function.

  # 1 method for generic function "clone":
  [1] clone(ctx, url, source_path; header, credentials, kwargs...) in Pkg.GitTools at /home/ghavami/programms/julia-1.4.1/share/julia/stdlib/v1.4/Pkg/src/GitTools.jl:125

The method in the Julia 1.3.1:

help?> Pkg.GitTools.clone
  No documentation found.

  Pkg.GitTools.clone is a Function.

  # 1 method for generic function "clone":
  [1] clone(url, source_path; header, kwargs...) in Pkg.GitTools at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/GitTools.jl:111

I do not think it is part of the API, so technically it can change anytime. The fact that it is not documented should be a strong signal of this.

In any case, ctx is usually a Pkg.Types.Context, but again, I don’t think that is meant for use outside Pkg.

2 Likes

I took my lesson.
Thank you very much.