From: Ted Bullock Subject: Re: vi struggling to save commit messages To: "Todd C. Miller" Cc: gameoftrees@openbsd.org Date: Wed, 8 Mar 2023 13:54:24 -0700 On 2023-03-08 1:24 p.m., Todd C. Miller wrote: > On Wed, 08 Mar 2023 13:19:39 -0700, Ted Bullock wrote: > >> I can see why it triggers, it's comparing identical timestamps, not >> relative. This is inconsistent with the error text too which explicitly >> says "file modified more recently than this copy". >> >> timespeccmp(&sb.st_mtim, &ep->mtim, !=) >> >> should be >> >> timespeccmp(&sb.st_mtim, &ep->mtim, <=) > > Are you saying that the current mtime is _older_ than the original? > Is this just a matter of the nsec portion being truncated? > > - todd Here is a sample of the actual numbers, it's not a truncation. sb.st_mtim.tv_sec: 1678308226, sb.st_mtim.tv_nsec: 125222348 ep->mtim.tv_sec: 1678308226, ep->mtim.tv_nsec: 55250221 -- Ted Bullock