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

**URL:** <https://discourse.julialang.org/t/pkg-gittools-clone-have-been-changed-and-what-is-the-ctx/38651>\
**Category:** Internals & Design\
**Created:** [May 3, 2020, 7:49am UTC](https://discourse.julialang.org/t/pkg-gittools-clone-have-been-changed-and-what-is-the-ctx/38651 "2020-05-03T07:49:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alireza\_Ghavaminia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alireza_ghavaminia/32/14397_2.png) [@Alireza\_Ghavaminia](https://discourse.julialang.org/u/Alireza_Ghavaminia)\
**Post date:** [May 3, 2020, 7:49am UTC](https://discourse.julialang.org/t/pkg-gittools-clone-have-been-changed-and-what-is-the-ctx/38651/1 "2020-05-03T07:49:31Z")

</div>

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 😄)

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

The method in the Julia 1.4.1:

```julia
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:

```julia
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

```

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [May 3, 2020, 8:18am UTC](https://discourse.julialang.org/t/pkg-gittools-clone-have-been-changed-and-what-is-the-ctx/38651/2 "2020-05-03T08:18:52Z")

</div>

> [@Alireza\_Ghavaminia](#):
>
> has been changed without noticing it’s change in the release notes

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`.

---

<div class="post-metadata">

**Author:** ![Alireza\_Ghavaminia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alireza_ghavaminia/32/14397_2.png) [@Alireza\_Ghavaminia](https://discourse.julialang.org/u/Alireza_Ghavaminia)\
**Post date:** [May 3, 2020, 8:25am UTC](https://discourse.julialang.org/t/pkg-gittools-clone-have-been-changed-and-what-is-the-ctx/38651/3 "2020-05-03T08:25:24Z")

</div>

I took my lesson.  
Thank you very much.
