Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

commands/helpers.rb: Verify network-cache is non-empty

In some circumstances, .git/network-cahche exists but is empty.
This causes json to throw errors when it attempts to parse the
file.  Rather than just verifying that .git/network-cache exists,
we also verify that its size is non-zero.
  • Loading branch information...
commit 8dd67a00a93edb69f5b508e32a1b71a0031e135d 1 parent 6d7194b
@bfroehle bfroehle authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/commands/helpers.rb
View
2  lib/commands/helpers.rb
@@ -389,7 +389,7 @@
end
helper :has_cache? do
- File.file?(network_cache_path)
+ File.file?(network_cache_path) && !File.zero?(network_cache_path)
end
helper :has_commits_cache? do
Please sign in to comment.
Something went wrong with that request. Please try again.