sha1_file.c: move the core logic of find_pack_entry() into fill_pack_entry()