The sound distributed version control system

#705 mtime detection - future vs. past

Opened by tankf33der on August 15, 2022
tankf33der on August 15, 2022

Probably root of #701 and #704.

pijul diff -su always detects change if mtime in the future and only 60 minutes in the past.

tankf33der on August 15, 2022
$ pijul init p1
$ cd p1
$ rm .ignore
$ touch a
$ pijul add a
$ pijul record -am"."
Hash: TAQTC5NMZEAOPWOH6QHY2QWIJESYHJG7PSADWUF4WY577S76ZLUQC
$ echo "1" >> a
$ pijul diff -su
M a
$ stat a
  File: a
  Size: 2               Blocks: 8          IO Block: 4096   regular file
Device: 803h/2051d      Inode: 393443      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-08-15 15:14:00.993223624 +0300
Modify: 2022-08-15 15:14:00.173204963 +0300
Change: 2022-08-15 15:14:00.173204963 +0300
$ touch -m -t 202208151414 a
$ pijul diff -su
# empty output
# set 2 days in the futue
$ touch -m -t 202208171514 a
$ stat a
$ stat a
  File: a
  Size: 2               Blocks: 8          IO Block: 4096   regular file
Device: 803h/2051d      Inode: 393443      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-08-15 15:14:00.993223624 +0300
Modify: 2022-08-17 15:14:00.000000000 +0300
Change: 2022-08-15 15:16:34.326712481 +0300
$ pijul diff -su
M a
$