Git checkout preserve timestamp?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I often find myself in branch A, with everything checked in and
compiled, wanting to look at something on branch B.  I hop to branch
B, look, and come back to branch A.  Unfortunately, when I then do a
make, files that differed between A and B will be recompiled, as well as
any further dependencies.

I wonder if it would be possible or desirable to have a config flag
that told git to restore the timestamps across branch checkouts in
order to prevent this perturbation.

So, when git does a checkout of a branch, it would look to see which
files in the current branch are changed, tuck away the timestamps for
those, and switch to the new branch.  On return to the former, the
same would be done for the new branch, then after the changed files
were restored, the timestamps would be reset.

One thing this would enable is to be able to hold the compilation
products of multiple branches at the same time in the same working
tree, switch back and forth between branches, and only have to compile
code that you actually modify.  Currently, we store compilation
products in a directory that is composed of the architecture, compiler,
compiler options, and so forth, among which also could be the branch
name.

Anyway, just an idea I thought worth batting about.


Bill
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]