From 1a7b9ae2a03e3be0d2254f54ebfcbbea649aea25 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 16 Sep 2013 18:03:25 +0200 Subject: on perservation of timestamps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- using-git.texinfo | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/using-git.texinfo b/using-git.texinfo index 58a66a3..3722ec0 100644 --- a/using-git.texinfo +++ b/using-git.texinfo @@ -1302,7 +1302,8 @@ is annoying. @chapter Features @menu -* Git and permissions: +* Git and permissions:: +* Git and timestamps:: @end menu @@ -1352,6 +1353,38 @@ to how a specific permission. +@node Git and timestamps +@section Git and timestamps + +One of Git's features is that it does +not have the feature@footnote{Yes, that +it does not have it. Do not be confused, +not have features are often grater features.} +of perserving timestamps. + +Perserving modification time on files is +considered harmful. Consider if Git were +to perserve the modification time. If you +have compiled the program, and then checkout +en earlier commit, perhaps another branch, +and you build it again, now your compiled +files from the other branch has a newer time +stamp then the source in the current branch +and the files will not build unless you +force them to build, which you more than +likely will forget. So you may observe a +behaviour of your program that is not defined +by the checkout source code. + +This is way Git sets the timestamp to the +current time on every file it modifies, but +only those. Files that have not changes will +not change timestamp so the build system +will not rebuild them unless there is some +other reason it needs to. + + + @node Beyond Git @chapter Beyond Git -- cgit v1.2.3-70-g09d2