Message ID | 41d34b1f180350c466243ed5aa7f6a48a2ff2aeb.1631228928.git.me@ttaylorr.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 16a86907bca0ae7ed9f1dfaa6261234215151396 |
Headers | show |
Series | packfile: avoid .idx rename races | expand |
diff --git a/pack-write.c b/pack-write.c index 58bc5fbcdf..b9f9cd5c14 100644 --- a/pack-write.c +++ b/pack-write.c @@ -491,9 +491,9 @@ void finish_tmp_packfile(struct strbuf *name_buffer, pack_idx_opts->flags); rename_tmp_packfile(name_buffer, pack_tmp_name, "pack"); - rename_tmp_packfile(name_buffer, idx_tmp_name, "idx"); if (rev_tmp_name) rename_tmp_packfile(name_buffer, rev_tmp_name, "rev"); + rename_tmp_packfile(name_buffer, idx_tmp_name, "idx"); free((void *)idx_tmp_name); }