From 3273f6b4c5390e2f3de56e9ec015184f32d10588 Mon Sep 17 00:00:00 2001 From: Christian Spurk Date: Fri, 9 May 2014 11:05:50 +0200 Subject: =?UTF-8?q?fix=20OSError=20on=20=E2=80=9Cgit=20fat=20pull=E2=80=9D?= =?UTF-8?q?=20with=20manually=20removed,=20tracked=20files=20in=20WC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If there is any manually removed, tracked file in the working copy, then running “git fat pull” fails with an OSError without this fix. --- git-fat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git-fat') 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 -- cgit v1.2.1