Fixing hang that happens sometimes in large git repos