Re: Setting file timestamps to commit time (git-checkout)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 9, 2013, 20:35 UTC
- Message-ID
- <xmqqsiu1yd7p.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20131209112528.GA5309@linux.vnet.ibm.com>
Dominik Vogt <vogt@linux.vnet.ibm.com> writes:
Show 11 quoted lines
> 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. > <target>.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 am not quite sure I follow your set-up. Do you have three working trees connected to a repository (via contrib/workdir/git-new-workdir perhaps), each having a checkout of its own branch? And in one working directory that has build-a checked out, a new commit touches one file, <target>.opt, to make a new commit:
Before:
---o---o---X
^ refs/heads/build-a
refs/heads/build-b
refs/heads/build-cAfter:
v refs/heads/build-a
---o---o---X---Y
^ refs/heads/build-b
refs/heads/build-cBecause you said that branch b and c hasn't changed at all, I do not see how your build-b and/or build-c directories become dirty.