Re: Git checkout preserve timestamp?

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

 



On 2007-03-05 12:13:50 +0000, Andy Parkins wrote:

> On Friday 2007 March 02 16:21, Karl Hasselström wrote:
>
> > However, given that your file timestamps have been bumped (without
> > file content changes), it's a performance bug in your make tool if
>
> Actually, git is as good as it could reasonably get in this regard.

I know.

> Let's say you did this:
>
>  git checkout branch1
>  git checkout branch2
>  git checkout branch1
>
> Git will only touch the timestamps of files that are different
> between the branches.

Yes.

> The fact that you've changed back from branch2 to branch1 is the
> bone of contention - how is git meant to know that you haven't done
> a compilation while you were on branch2 and hence changed the files
> that untracked files depend on? The /only/ sane thing it can do is,
> in both cases, update changed files to have the current time.

Yes, that's the only sane thing.

My point isn't that _git_ should know that I haven't compiled stuff.
My point is that my make tool should realize that even though the
file's timestamp has changed since last rebuild, the contents haven't
changed (or, to be precise, they're identical to what they were), and
so there's no need to rebuild.

Now, obviously "make" isn't such a make tool, since it goes only by
timestamps.

-- 
Karl Hasselström, kha@xxxxxxxxxxx
      www.treskal.com/kalle
-
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]