From: jeffpc@josefsipek.net
To: tytso@mit.edu
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] guilt: Make sure the commit time is increasing
Date: Sun, 4 Jul 2010 23:01:08 -0400 [thread overview]
Message-ID: <20100705030107.GR22659@josefsipek.net> (raw)
In-Reply-To: <20100705025117.GC6384@thunk.org>
On Sun, Jul 04, 2010 at 10:51:17PM -0400, tytso@mit.edu wrote:
> On Sun, Jul 04, 2010 at 10:23:59PM -0400, Theodore Ts'o wrote:
> > + ct=$(git log -1 --pretty=%ct)
> > + if [ $ct -gt $(stat -c %Y "$p") ]; then
> > + echo "Warning time went backwards, adjusting mod time of" \
> > + $(basename "$p")
> > + touch -d @$(expr $ct + 60) "$p" || touch "$p"
> ^^^^^^^^^^^^^
>
> hmm, I just realized, this is strictly speaking not necessary.
>
> "stat -c %Y" means that guilt only works if GNU coreutils is
> installed, which means that "touch -d @secs-since-epoch" should also
> work.
>
> This will be a problem on legacy systems such as Solaris (unless their
> path puts the GNU utilities head of their System V-style utilities),
> but that's going to be true of guilt in general, it looks like.
I've been meaning to make guilt less GNU-dependant, but I just don't use
non-Linux systems enough (read: almost never) to do it myself.
Jeff.
--
The box said "Windows XP or better required". So I installed Linux.
next prev parent reply other threads:[~2010-07-05 3:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-05 2:23 [PATCH] guilt: Make sure the commit time is increasing Theodore Ts'o
2010-07-05 2:51 ` tytso
2010-07-05 3:01 ` jeffpc [this message]
2010-07-05 2:59 ` jeffpc
2010-07-05 11:06 ` Theodore Tso
2010-07-05 18:52 ` jeffpc
2010-07-05 19:22 ` tytso
2010-07-06 8:03 ` Jonathan Nieder
2010-07-06 10:56 ` Theodore Tso
2010-07-06 15:09 ` Jonathan Nieder
2010-07-06 17:12 ` tytso
2010-07-06 17:29 ` Jonathan Nieder
2010-07-06 13:53 ` Erik Faye-Lund
2010-07-06 14:29 ` Jeff King
2010-07-06 15:02 ` Erik Faye-Lund
2010-07-06 17:21 ` tytso
2010-07-06 17:29 ` jeffpc
2010-07-06 18:57 ` tytso
2010-07-14 3:01 ` Josef 'Jeff' Sipek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100705030107.GR22659@josefsipek.net \
--to=jeffpc@josefsipek.net \
--cc=git@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).