From: Dominik Vogt Date: Mon, 09 Dec 2013 11:25:28 GMT Subject: Setting file timestamps to commit time (git-checkout) Message-ID: <20131209112528.GA5309@linux.vnet.ibm.com> Me and some colleagues work on gcc in lots of different branches. For each branch there is a separate build directory for each branch, e.g. build-a, build-b and build-c. Let's assume that all branches are identical at the moment. If a file in branch a is changed that triggers a complete rebuild of gcc (e.g. .opt), rebuilding in build-a takes about an hour. Now, when I switch to one of the other branches, said file is not identical anymore and stamped with the _current_ time during checkout. Although branch b and c have not changed at all, they will now be rebuilt completely because the timestamp on that files has changed. I.e. a chance on one branch forces a rebuild on n other branches, which can take many hours. I think this situation could be improved with an option to git-checkout with the following logic: $ git checkout FOR EACH in working directory of IF is identical to the version in the THEN leave the file untouched ELSE IF of the HEAD of the is in the future THEN checkout the new version of and stamp it with the current time ELSE (commit timestamp is current or in the past) THEN checkout the new version of and stamp it with the commit timestamp of the current HEAD of Any comments? Is there already a way to do this? (Please do not cc me on replies, I'm subscribed to the list.) Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany