"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: checkout -E and existing files
To:
Omar Polo <op@omarpolo.com>
Cc:
Christian Weisgerber <naddy@mips.inka.de>, gameoftrees@openbsd.org
Date:
Sat, 16 Sep 2023 11:44:56 +0200

Download raw body.

Thread
On Fri, Sep 15, 2023 at 11:42:22PM +0200, Omar Polo wrote:
> On 2023/09/15 22:14:19 +0200, Christian Weisgerber <naddy@mips.inka.de> wrote:
> > Presumably got will eventually notice once the files that are
> > different are actually changed by some operation.
> 
> `find . -type f -exec touch {} +' should be enough to make got aware.
> Not a great solution indeed.
> 
> > I'm not sure what I was expecting, but the existing behavior seems ...
> > not useful?
> 
> We could put a timestamp older than the one of the file upon the first
> checkout.  Or just zero.  That should trigger `got status' to actually
> look at the file contents.  We should do this only for files that are
> already there however.

Good idea. Set the file index timestamp to epoch if -E is used.
The next status crawl will be slow but should update timestamps for
all files, and should detect files that differ from their base blob.