Re: Git checkout preserve timestamp?

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

 



On Tuesday, March 6, 2007 at 00:32:28 (+0100) Johannes Schindelin writes:
>...
>Bill, maybe you don't want to hear it, but for all those following this 
>thread, here is why you are wrong:

An actual demonstration of my stupidity is much, much preferable
to a mere assertion of it, so I read the following with relish.

>"make" does _not_ match the time stamps of xyz.c and xyz.o. After you 
>"make", the only thing which is guaranteed is that if xyz.c is _newer_ 
>than xyz.o, the compiler is started.
>
>Example:
>
>00:05 you pull upstream into your master branch, which has a newer xzy.c
>00:07 you type make. xyz.o is built, because make sees that xyz.c is 
>      newer than xyz.o
>00:12 you checkout your side branch, xyz.c is updated.
>00:13 you type make, and again xzy.o is built, because xyz.c is newer than 
>      xyz.o
>00:25 you switch back to your master branch.
>
>Now, if your wish would be granted, and xyz.c has the same timestamp as 
>before, then it _still_ is older than xyz.o. So make will not rebuild it.
>
>BUT xyz.o is actually compiled from the side branch's version of xyz.c!

No, I think you missed my point.  There are two xyz.o's:

One in .master/xyz.o, and one in .branchX/xyz.o.  So, you're example
becomes:

00:05 you pull upstream into your master branch, which has a newer xzy.c
00:07 you type make. .master/xyz.o is built, because make sees that xyz.c is 
      newer than .master/xyz.o
00:12 you checkout your side branch, xyz.c is updated.
00:13 you type make, and .branchX/xzy.o is built, because xyz.c is newer than 
      .branchX/xyz.o
00:25 you switch back to your master branch.
00:26 you type make, and nothing happens, as it should not.  You are
      happy, and thank the git community for all of their heroic efforts.

Now, I'm really going to go: the family is hungry and I've got
dinner to prepare, so if you want to flame me for opening my mouth
further, feel free.


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]