[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: --set-mtime-command (was Re: posix atime/ctime changes despite mtime

From: Paul Eggert
Subject: Re: --set-mtime-command (was Re: posix atime/ctime changes despite mtime being set)
Date: Wed, 2 Aug 2023 17:25:20 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 2023-08-02 11:09, Sergey Poznyakoff wrote:

Some time ago Bruno Haible suggested a simpler approach, which may be
better for GNU tar's users. Here's the idea, which requires two passes
over the input files, the first to collect timestamp info:

I like the idea, although I doubt that its implementation would be less
complicated than the above.

Yes, it'd be more work for Tar. Less work for Tar's users, I hope.

So we assume that --reproducible-mtime option would work only for git,

It should work for any version-control system. It doesn't even assume a version control system, or that you use a timestamp-based build system like 'make'. All it assumes is that you have source files maintained by hand with reliable timestamps, and that you did a build sequentially from scratch with an increasing clock so that build products' timestamps are in ascending order and have timestamps greater than the newest source file.

In short, it looks like we have to find a better way to extract mtimes
from git.

One possibility is to parse the output of the command "git log --raw --pretty=format:%ct". Admittedly this will be a bit of work.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]