read_sha1_file(): allow selective bypassing of replacement mechanism