Skip to content

Commit

Permalink
builtin/index-pack.c: move .idx files into place last
Browse files Browse the repository at this point in the history
In a similar spirit as preceding patches to `git repack` and `git
pack-objects`, fix the identical problem in `git index-pack`.

Signed-off-by: Taylor Blau <[email protected]>
Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]>
Signed-off-by: Taylor Blau <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
ttaylorr authored and gitster committed Sep 10, 2021
1 parent 8737dab commit 522a5c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/index-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -1527,11 +1527,11 @@ static void final(const char *final_pack_name, const char *curr_pack_name,

rename_tmp_packfile(&final_pack_name, curr_pack_name, &pack_name,
hash, "pack", from_stdin);
rename_tmp_packfile(&final_index_name, curr_index_name, &index_name,
hash, "idx", 1);
if (curr_rev_index_name)
rename_tmp_packfile(&final_rev_index_name, curr_rev_index_name,
&rev_index_name, hash, "rev", 1);
rename_tmp_packfile(&final_index_name, curr_index_name, &index_name,
hash, "idx", 1);

if (do_fsck_object) {
struct packed_git *p;
Expand Down

0 comments on commit 522a5c2

Please sign in to comment.