From: Bill Lear Date: Mon, 05 Mar 2007 14:46:52 GMT Subject: Re: Git checkout preserve timestamp? Message-ID: <17900.11612.872928.633406@lisa.zopyra.com> In-Reply-To: <200703051213.52513.andyparkins@gmail.com> On Monday, March 5, 2007 at 12:13:50 (+0000) Andy Parkins writes: >... >Now take the suggestion that timestamps from the repository version should be >restored and do the same thing: > > git checkout branch1 > # sourcefile.c changes, git sets the timestamp to $timestamp1 > # make would rebuild sourcefile.o (setting its timestamp to $now) > git checkout branch2 > # sourcefile.c changes, so sets the timestamp to $timestamp2 > # make wouldn't rebuild sourcefile.o because $timestamp2 < $now > git checkout branch1 > # sourcefile.c changes, so git sets the timestamp to $timestamp1 > # make wouldn't rebuild sourcefile.o because $timestamp1 < $now > >All very wrong; in two out of the three builds, the wrong >sourcefile.o ends up in the final object. All very wrong if you ignore what I wrote as part of my original note: keep compilation products separated by branch name, not in the same place. This is essential to my request: without it, it is indeed very wrong. We currently separate out by compiler, options, machine architecture, and adding the branch to that is trivial. Bill