# Pijul clones a non-empty remote repo into an empty repo

**URL:** <https://discourse.pijul.org/t/pijul-clones-a-non-empty-remote-repo-into-an-empty-repo/108>\
**Category:** Question\
**Created:** [November 19, 2017, 8:36am UTC](https://discourse.pijul.org/t/pijul-clones-a-non-empty-remote-repo-into-an-empty-repo/108 "2017-11-19T08:36:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjmackenzie](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/sjmackenzie/32/36_2.png) [@sjmackenzie](https://discourse.pijul.org/u/sjmackenzie)\
**Post date:** [November 19, 2017, 8:36am UTC](https://discourse.pijul.org/t/pijul-clones-a-non-empty-remote-repo-into-an-empty-repo/108/1 "2017-11-19T08:36:37Z")

</div>

Greetings,

I’m running:

```auto
$ pijul --version
pijul 0.7.2

```

when I clone this repo: `pijul clone https://nest.pijul.com/pmeunier/nix-rust`

It results in an empty repo, with the `.pijul` directory containing empty patches:

```auto
ls -la
total 12
drwxr-xr-x 3 stewart users 4096 Nov 19 16:35 .
drwxr-xr-x 99 stewart users 4096 Nov 19 16:35 ..
drwxr-xr-x 4 stewart users 4096 Nov 19 16:35 .pijul

```

please advise

---

<div class="post-metadata">

**Author:** ![pmeunier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/pmeunier/32/4_2.png) [@pmeunier](https://discourse.pijul.org/u/pmeunier)\
**Post date:** [November 19, 2017, 11:10am UTC](https://discourse.pijul.org/t/pijul-clones-a-non-empty-remote-repo-into-an-empty-repo/108/2 "2017-11-19T11:10:26Z")

</div>

This is because your version of Pijul is too old. You need Pijul \>= 0.8.3 to clone from the Nest.

---

<div class="post-metadata">

**Author:** ![sjmackenzie](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/sjmackenzie/32/36_2.png) [@sjmackenzie](https://discourse.pijul.org/u/sjmackenzie)\
**Post date:** [November 19, 2017, 12:23pm UTC](https://discourse.pijul.org/t/pijul-clones-a-non-empty-remote-repo-into-an-empty-repo/108/3 "2017-11-19T12:23:45Z")

</div>

Ah okay, that was from nixpkgs, I’ll update that and see how it goes! Thanks!

---

<div class="post-metadata">

**Author:** ![sjmackenzie](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/sjmackenzie/32/36_2.png) [@sjmackenzie](https://discourse.pijul.org/u/sjmackenzie)\
**Post date:** [November 19, 2017, 12:48pm UTC](https://discourse.pijul.org/t/pijul-clones-a-non-empty-remote-repo-into-an-empty-repo/108/4 "2017-11-19T12:48:23Z")

</div>

Bit of a bummer, but pijul needs its lockfile updated so nix can build it using the old rust toolchain on nixpkgs. Correctly updating the SHAs (sha256 and cargoSha256) resulted in this error:

```auto
building path(s) ‘/nix/store/hmk3hljcri7wxfld3yd9gna20pn4mckr-pijul-0.8.3’
unpacking sources
unpacking source archive /nix/store/cqlnlvbsi4kqd0rc9c7x0w8rhjcq3xdy-pijul-0.8.3.tar.gz
source root is pijul-0.8.3/pijul
patching sources
configuring
building
Running cargo build --release 
error: the lock file needs to be updated but --locked was passed to prevent this

```

---

<div class="post-metadata">

**Author:** ![sjmackenzie](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/sjmackenzie/32/36_2.png) [@sjmackenzie](https://discourse.pijul.org/u/sjmackenzie)\
**Post date:** [November 19, 2017, 12:54pm UTC](https://discourse.pijul.org/t/pijul-clones-a-non-empty-remote-repo-into-an-empty-repo/108/5 "2017-11-19T12:54:30Z")

</div>

Ah wait, this is because the old rust toolchain is out of date… looking forward to the `carnix` approach!

---

<div class="post-metadata">

**Author:** ![sjmackenzie](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/sjmackenzie/32/36_2.png) [@sjmackenzie](https://discourse.pijul.org/u/sjmackenzie)\
**Post date:** [November 19, 2017, 1:13pm UTC](https://discourse.pijul.org/t/pijul-clones-a-non-empty-remote-repo-into-an-empty-repo/108/6 "2017-11-19T13:13:26Z")

</div>

`cargo install pijul` solved it.
