pijul_org / pijul

#254 pijul diff always increases the pristine size

Opened by lthms, on April 28, 2018
Bug
Closed
lthms commented on April 28, 2018

We really should fix that, I think.\r+ \r + Same goes for pijul status.

pmeunier commented on April 28, 2018

Can you write a test?

lthms commented on April 28, 2018

In any repository:\r + \r +

du -h .pijul\r                                                     +
pijul diff\r                                                       +
du -h .pijul\r                                                     +
```\r                                                              +
\r                                                                 +
The second size is larger than the first.\r                        +
\r                                                                 +
A script which fails if the size increases:\r                      +
\r                                                                 +
```bash\r                                                          +
#!/usr/bin/bash\r                                                  +
\r                                                                 +
before="$(du .pijul/pristine | sed -e 's/ *\.pijul\/pristine//')"\r+
pijul status > /dev/null\r                                         +
after="$(du .pijul/pristine | sed -e 's/ *\.pijul\/pristine//')"\r +
\r                                                                 +
if (("${after}" > "${before}")); then\r                            +
    exit 1\r                                                       +
fi\r                                                               +
lthms commented on April 28, 2018

Fun. It looks like pijul record reduces the size of the pristine.

pmeunier commented on October 22, 2018

I just fixed this. pijul record might sometimes reduce the size of the pristine, depending on the previous operation.

pmeunier closed this discussion on October 22, 2018