The sound distributed version control system

#280 diff cant detect tricky changes

Closed on July 21, 2021
tankf33der on January 22, 2021

cargo, alpha.37.

I’ve invented tricky scenario, git-mercurial-darcs detected me and fired.

If remove steps “AAA-ZZZ” pijul can detect a file compression-replace too.

$ rm -rf p1
$ pijul init p1
$ cd p1
# AAA
$ touch a
$ vim a
$ cat a
1
2
3
$ pijul add a
$ pijul rec -am"."
Hash: U6DPR3GLK2MXWY7KWHCL2CQRTZJGL5CKKF2W355BYYJHNXMPF3HQC
$ pijul ls
a
# ZZZ
$ cp /bin/date a
$ pijul diff --short
R a
$ pijul record -am"."
$ stat a
   File: a
  Size: 108832          Blocks: 216        IO Block: 4096   regular file
Device: 803h/2051d      Inode: 101916207   Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-01-22 12:33:07.214538282 +0200
Modify: 2021-01-22 12:33:05.926509680 +0200
Change: 2021-01-22 12:33:05.926509680 +0200
 Birth: 2021-01-22 12:32:27.065646695 +0200
$ xz a
$ mv a.xz a
$ stat a
  File: a
  Size: 42456           Blocks: 88         IO Block: 4096   regular file
Device: 803h/2051d      Inode: 101923367   Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-01-22 12:33:07.214538282 +0200
Modify: 2021-01-22 12:33:05.926509680 +0200
Change: 2021-01-22 12:34:12.982998801 +0200
 Birth: 2021-01-22 12:34:10.454942663 +0200
$ pijul diff --short
$
tankf33der on January 22, 2021

Repeated on different Linux distro and found I cant do pijul reset too, I cant get back to 108832 size file.

tankf33der on March 31, 2021

addition for collection:

$ pijul init p1
$ cd p1
$ cp /bin/date .
$ pijul add date
$ pijul rec -am"."
$ stat date
  File: date
  Size: 108832          Blocks: 216        IO Block: 4096   regular file
Device: 803h/2051d      Inode: 35117381    Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-03-31 17:22:05.692018821 +0300
Modify: 2021-03-31 17:22:03.823971177 +0300
Change: 2021-03-31 17:22:03.823971177 +0300
 Birth: 2021-03-31 17:21:51.977669013 +0300
$ cksum date
2801912964 108832 date
$ upx date
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2020
UPX 3.96        Markus Oberhumer, Laszlo Molnar & John Reiser   Jan 23rd 2020

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
    108832 ->     49364   45.36%   linux/amd64   date

Packed 1 file.
$ cksum date
1679261161 49364 date
$ stat date
  File: date
  Size: 49364           Blocks: 104        IO Block: 4096   regular file
Device: 803h/2051d      Inode: 35117375    Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-03-31 17:23:12.176714597 +0300
Modify: 2021-03-31 17:22:03.000000000 +0300
Change: 2021-03-31 17:22:50.356158037 +0300
 Birth: 2021-03-31 17:22:50.295156481 +0300
$ pijul diff --short
$
pmeunier added a change on July 21, 2021
QU6T6J6WEZ6IYZC57YAUCET2V6WHVKJ2Q4UGB2GOK45VIGDPBR2QC
main
pmeunier on July 21, 2021

Alright, I just fixed this. Once again, thanks!

This allowed me to discover that Windows is using January 1st, 1601 as the reference time for its modification files. I guess the intent is to look like they’re centuries ahead of Unix. Didn’t do the trick for me though…

pmeunier closed this discussion on July 21, 2021