From 616bb1ab21c35e58e14b9fdebddadb21fa42eacc Mon Sep 17 00:00:00 2001 From: yuyang Date: Mon, 27 Apr 2015 01:45:18 -0700 Subject: [PATCH] resolves #49 to make 'git fat pull' compatible with a sparse-checkout repository --- git_fat/git_fat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git_fat/git_fat.py b/git_fat/git_fat.py index f215dfc..812086e 100755 --- a/git_fat/git_fat.py +++ b/git_fat/git_fat.py @@ -618,6 +618,8 @@ def _orphan_files(self, patterns=None): patterns = patterns or [] # Null-terminated for proper file name handling (spaces) for fname in sub.check_output(['git', 'ls-files', '-z'] + patterns).split('\x00')[:-1]: + if not os.path.exists(fname): + continue st = os.lstat(fname) if st.st_size != self._magiclen or os.path.islink(fname): continue