diff options
author | Jed Brown <jed@59A2.org> | 2012-11-26 11:48:18 +0100 |
---|---|---|
committer | Jed Brown <jed@59A2.org> | 2012-11-26 11:48:18 +0100 |
commit | 8929613ecf4172a575839a78acc481cadeacd5c0 (patch) | |
tree | 2ed3113c6397020e8a00d68a56892545934e7541 | |
parent | f64ccb7c0cc2be010e5b2e5014c08df790421388 (diff) | |
download | git-fat-8929613ecf4172a575839a78acc481cadeacd5c0.tar.gz |
Comment explaining how 'git fat checkout' forces resmudging
-rwxr-xr-x | git-fat | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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)) |