diff options
author | Christian Spurk <christian.spurk@gmail.com> | 2014-05-09 11:05:50 +0200 |
---|---|---|
committer | Christian Spurk <christian.spurk@gmail.com> | 2014-05-09 11:05:50 +0200 |
commit | 3273f6b4c5390e2f3de56e9ec015184f32d10588 (patch) | |
tree | c3c66e9dd9b634aa5c87082176923664dc6b78b2 | |
parent | 7cb170a7101c3b8599b6aa7765600108c83013dd (diff) | |
download | git-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.
-rwxr-xr-x | git-fat | 5 | ||||
-rwxr-xr-x | test.sh | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -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 @@ -32,3 +32,9 @@ cd fat-test2 git fat init git fat pull -- 'a.fa*' cat a.fat +echo 'file which is committed and removed afterwards' > d +git add d +git commit -m'add d with normal content' +rm d +git fat pull + |