git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git reset and ctime
@ 2010-12-03 21:36 ghazel
  2010-12-04  0:51 ` Jonathan Nieder
  0 siblings, 1 reply; 8+ messages in thread
From: ghazel @ 2010-12-03 21:36 UTC (permalink / raw)
  To: git

Hi,

I've encountered a strange issue where "git reset --hard" insists on
"Checking out files ..." when all that is changed is the ctime on
these files. My deploy process (capistrano) maintains a cached copy of
a git repo, which it fetches, resets, and then hardlinks files from
when a deploy occurs ( https://github.com/37signals/fast_remote_cache
). The hardlinking step is meant to save the time of copying the file.
but hardlinking changes the ctime of the source files. That causes git
reset to re-check out the files when the next deploy occurs, which is
quite time-consuming. Some helpful people on #git showed that "git
update-index --refresh" before the git reset prevents this behavior,
but I wonder why that is needed at all.

Should git reset be performing whatever "git update-index --refresh"
is doing? Certainly in this case it would result in a vast speed
improvement.

-Greg

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-12-07 15:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-03 21:36 git reset and ctime ghazel
2010-12-04  0:51 ` Jonathan Nieder
2010-12-04  1:39   ` ghazel
2010-12-04  1:47     ` Jonathan Nieder
2010-12-04  2:28   ` Junio C Hamano
2010-12-06 17:37   ` Drew Northup
2010-12-06 17:51     ` Jonathan Nieder
2010-12-07 15:14       ` Drew Northup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).