Re: preserving mtime

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Fabrizio Pollastri <f.pollastri@...>
Cc: <git@...>
Date: Friday, November 16, 2007 - 8:09 am

* Fabrizio Pollastri <f.pollastri@inrim.it> [2007-11-16 10:33:45 +0100]:

You may find the script "git-set-file-times" in the GitWiki
useful:

  ExampleScripts - GitWiki
  Setting the timestamps of the files to the commit timestamp
  of the commit which last touched them
    <http://git.or.cz/gitwiki/ExampleScripts#head-a57deb2b4ab1e2de80ab5fd3c681a6055a9d3247>

You should of course pay attention to advice about (and
against) doing stuff like this, both in the description of that
script and in other postings on this list.  But as you are
using Git to manage web files and you (probably) don't care
about build systems such as "make", you should be pretty safe.

About the script:  I think it originally was made by Eric Wong
(= normalperson) who is also on this list.  I have just made a
tiny, tiny modification to it (adding " or s/\0$//" to the
elsif test).

I've also thought about adding a --prefix option to the script.
This would enable it to be used together with git-archive,
leaving the working directory alone and affecting the files in
the directory where the archive is extracted instead.  In this
way, you would distinguish between your working directory and
your "live" directory, and the command sequence

  git archive --prefix=foo/ HEAD | (cd /var/www/ && tar xf -)
  git-set-file-times --prefix=/var/www/foo/

would be part of the build system, publishing your working
directory to your "live" directory (in this case
/var/www/foo/).

-- 
Erik Warendorph <erik@warendorph.org>
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
preserving mtime, Fabrizio Pollastri, (Fri Nov 16, 5:33 am)
Re: preserving mtime, Erik Warendorph, (Fri Nov 16, 8:09 am)
Re: preserving mtime, Junio C Hamano, (Fri Nov 16, 6:21 am)
Re: preserving mtime, Andreas Ericsson, (Fri Nov 16, 6:15 am)
Re: preserving mtime, Wayne Davison, (Sat Nov 17, 2:22 pm)
Re: preserving mtime, Johannes Schindelin, (Mon Nov 19, 10:38 am)
Re: preserving mtime, Mike Hommey, (Sun Nov 18, 4:45 am)
Re: preserving mtime, Jan Hudec, (Sun Nov 18, 5:40 am)
Re: preserving mtime, Robin Rosenberg, (Sun Nov 18, 6:42 am)
Re: preserving mtime, Martin Langhoff, (Sun Nov 18, 5:34 am)
Re: preserving mtime, David Brown, (Sun Nov 18, 2:47 pm)
Re: preserving mtime, Martin Langhoff, (Sun Nov 18, 4:36 pm)
Re: preserving mtime, David Brown, (Sun Nov 18, 5:44 pm)