Skip to content

git.py: Don't run version() at module top level

Before:
GIT_VERSION = version() would cause git to run as soon as the
module was imported.

After:
GIT_VERSION has been removed and version() is called when it is
actually needed. functools.lru_cache() is used to memoize the
version information.

Edited by Ahmon Dancy

Merge request reports