diff options
Diffstat (limited to 'git-fat')
-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)) |