summaryrefslogtreecommitdiff
path: root/git-fat
diff options
context:
space:
mode:
Diffstat (limited to 'git-fat')
-rwxr-xr-xgit-fat7
1 files changed, 7 insertions, 0 deletions
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))