Re: [PATCH v3 09/12] transport-helper: warn when export-marks file cannot be finalized
Patrick Steinhardt <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Aug 12, 2026 at 08:03:17AM +0000, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin <[email protected]> > > When push_refs_with_export() finalizes a successful push, it writes > the fast-export marks file to a .tmp sibling and rename()s it into > place. The return value of rename() is currently ignored. If the > rename fails (permission denied, full disk, or an antivirus product > locking the destination on Windows), the .tmp file is left behind > and the existing export_marks file remains stale; the next > fast-export operation that resumes from it then silently operates on > inconsistent bookkeeping. One question here would be whether we should try to unlink the file instead if renaming it into place failed. But not doing so potentially gives the user the ability to fix that issue. So I'm not sure whether that's really a sensible thing to do in the first place. In any case, the post-image of this patch is a clear improvement as we now enable the user to act on the warning in the first place, whereas previously they wouldn't ever learn about it until the failed rename may cause errors. So overall I think this is okay as-is. Patrick