Ensure the repository configuration lock is released
When zuul initializes a fresh clone of a git repository, it attempts to set
the user.name and user.email configuration options in .git/config. This job is
the responsibility of GitConfigParser, which is currently broken, because
GitConfigParser.write() acquires a lock but does not release it. The lock is
released in the object's del method, which is invoked when the object is
about to be dereferenced. This is not a reliable means of ensuring the
lock is released, because it can break if there is a circular reference keeping
the object alive, or if another GitConfigParser object for the same
repository is initiated while a reference to the existing one is still held.
The author of GitPython appears to still be struggling with this as of
commit a05e49d2419 of GitPython. Fortunately, we don't have to chase this
down: we can just clear the lock when we know we're done, rather than hope that
del gets called.