From 8929613ecf4172a575839a78acc481cadeacd5c0 Mon Sep 17 00:00:00 2001 From: Jed Brown Date: Mon, 26 Nov 2012 11:48:18 +0100 Subject: Comment explaining how 'git fat checkout' forces resmudging --- git-fat | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'git-fat') diff --git a/git-fat b/git-fat index b2ec8d7..e963a7e 100755 --- a/git-fat +++ b/git-fat @@ -205,7 +205,14 @@ class GitFat(object): objpath = os.path.join(self.objdir, digest) if os.access(objpath, os.R_OK): print('Restoring %s -> %s' % (digest, fname)) + # The output of our smudge filter depends on the existence of + # the file in .git/fat/objects, but git caches the file stat + # from the previous time the file was smudged, therefore it + # won't try to re-smudge. I don't know a git command that + # specifically invalidates that cache, but touching the file + # also does the trick. os.utime(fname, None) + # This re-smudge is essentially a copy that restores permissions. subprocess.check_call(['git', 'checkout-index', '--index', '--force', fname]) elif show_orphans: print('Data unavailable: %s %s' % (digest,fname)) -- cgit v1.2.1