"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > From: Han-Wen Nienhuys <hanwen@xxxxxxxxxx> > > Errno is a global variable written by almost all system calls, and therefore it > is hard to reason about its state. > > This is a functional noop, because calls to lock_ref_oid_basic() in this file > are followed by: > > * lock_ref_oid_basic (copy/rename rollback error path) > > * write_ref_to_lockfile (both in the rollback path and the success path of > copy/rename) > > * create_symref_locked (files_create_symref) > > * refs_reflog_exists (reflog expiry) > > These calls do I/O and therefore clobber errno. They are not inspecting the > incoming errno. Hmph, are you saying that these calls do I/O and always the I/O would fail? A system call that is successfull don't touch errno; only the calls that resulted in failure do.