diff options
author | Jed Brown <jed@59A2.org> | 2014-05-09 09:48:59 -0500 |
---|---|---|
committer | Jed Brown <jed@59A2.org> | 2014-05-09 09:48:59 -0500 |
commit | 456d22cb3c7ba60e15d5d0f7de771c2acf573481 (patch) | |
tree | e35ea81253535eb92d915aa2b541bb3274e5ede2 | |
parent | 0f6c2802a97cb32d7541b2007804501c57810a05 (diff) | |
parent | 3273f6b4c5390e2f3de56e9ec015184f32d10588 (diff) | |
download | git-fat-456d22cb3c7ba60e15d5d0f7de771c2acf573481.tar.gz |
Merge branch 'fix-OSError-on-removed-tracked-file' of github:cspurk/git-fat (PR #30)
* 'fix-OSError-on-removed-tracked-file' of github:cspurk/git-fat:
fix OSError on “git fat pull” with manually removed, tracked files in WC
-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 + |