summaryrefslogtreecommitdiff
path: root/git-fat
diff options
context:
space:
mode:
authorChristian Spurk <christian.spurk@gmail.com>2014-05-09 11:05:50 +0200
committerChristian Spurk <christian.spurk@gmail.com>2014-05-09 11:05:50 +0200
commit3273f6b4c5390e2f3de56e9ec015184f32d10588 (patch)
treec3c66e9dd9b634aa5c87082176923664dc6b78b2 /git-fat
parent7cb170a7101c3b8599b6aa7765600108c83013dd (diff)
downloadgit-fat-3273f6b4c5390e2f3de56e9ec015184f32d10588.tar.gz
fix OSError on “git fat pull” with manually removed, tracked files in WC
If there is any manually removed, tracked file in the working copy, then running “git fat pull” fails with an OSError without this fix.
Diffstat (limited to 'git-fat')
-rwxr-xr-xgit-fat5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-fat b/git-fat
index 9d4b1a1..f89cf59 100755
--- a/git-fat
+++ b/git-fat
@@ -195,7 +195,10 @@ class GitFat(object):
return itertools.chain([preamble], readblocks(stream)), None
def decode_file(self, fname):
# Fast check
- stat = os.lstat(fname)
+ try:
+ stat = os.lstat(fname)
+ except OSError:
+ return False, None
if stat.st_size != self.magiclen:
return False, None
# read file