http: cleanup function fetch_and_setup_pack_index()
Cleanup the function `fetch_and_setup_pack_index()` by removing the useless call to the function `unlink()`. This is not necessary anymore since 63aca3f7f1 (dumb-http: store downloaded pack idx as tempfile, 2024-10-25), when `fetch_pack_index()` started registering its return value (in this case `tmp_idx`) as a tempfile to be deleted at process exit. Signed-off-by: LorenzoPegorari <lorenzo.pegorari2002@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
LorenzoPegorari committed
Jun 1, 2026 at 15:52 UTC
96ee7f1650e6096561599f069d18c052412d7506
1 file changed
-2
http.c
-2
@@ -2609,9 +2609,7 @@ static int fetch_and_setup_pack_index(struct packfile_list *packs,
2609
2610
new_pack = parse_pack_index(the_repository, sha1, tmp_idx);
2611
if (!new_pack) {
2612
- unlink(tmp_idx);
2612
free(tmp_idx);
2614
-
2613
return -1; /* parse_pack_index() already issued error message */
2614
}
2615