git-upload-pack: More efficient usage of the has_sha1 array