Re: Restoring timestamps (Re: Branches & directories)
- From
- Hilco Wijbenga <hilco.wijbenga@gmail.com>
- Date
- Aug 22, 2011, 22:33 UTC
- Message-ID
- <CAE1pOi1+nnpnHAuhYsXcfFNUroW0JcDQKLu6D7YNrUwJg0tXPw@mail.gmail.com>
- In-Reply-To
- <20110822210141.GA3880@elie.gateway.2wire.net>
On 22 August 2011 14:01, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 13 quoted lines
> Hilco Wijbenga wrote: >> On 22 August 2011 12:31, Kyle Moffett <kyle@moffetthome.net> wrote: > >>> (1) The GIT data-structures simply have no place for file timestamps, and >>> "git stash" is simply a special way of dumping files into a temporary commit. >> >> That's what I thought. The "intentionally" threw me off. It's not >> intentional, it's just a side effect. > > For what it's worth: no, it's intentional. See, for example: > > http://thread.gmane.org/gmane.comp.version-control.git/1564/focus=1680 > https://git.wiki.kernel.org/index.php/GitFaq#Why_isn.27t_Git_preserving_modification_time_on_files.3F
After I had sent the above I realized it was worded a bit too strong.
Show 6 quoted lines
> That said, something being intentional does not necessarily mean it is > always _right_. So, for example, patches to allow a commit to store > some timestamps, with documentation explaining when this is > appropriate, would probably be welcome. Maybe a good place to store > such information would be a dotfile alongside the file (so old, > unaware git versions could extract the same information without fuss).
You mean an extra dotfile per file in the commit?
> Even if this feature were implemented just for "git stash", personally > I would turn it off so "make" could continue to behave as I expect it > to. But in principle, I don't mind the idea of it existing. :)
Given that apparently the majority of Git users don't want/need this, it should probably be off by default. So you would not even need to turn it off. :-)
In fact, I would not want it on by default either. It's really only useful when switching branches when I want to keep the exact state of the branch.