def _release_lock(self) -> None:
        """Release our lock if we have one."""
        if not self._has_lock():
            return

        # If someone removed our file beforehand, lets just flag this issue instead of
        # failing, to make it more usable.
        lfp = self._lock_file_path()
        try:
            rmfile(lfp)
        except OSError:
            pass
        self._owns_lock = False
Release our lock if we have one.
git/util.py