X-Git-Url: http://git.scottworley.com/pinch/blobdiff_plain/eb0c6f1b9ad97954d3ee229428ac84d8f33be546..bed3218277c11d0e6092683f0a2d00225f84d8ae:/pinch.py diff --git a/pinch.py b/pinch.py index 732a91f..24e132a 100644 --- a/pinch.py +++ b/pinch.py @@ -25,7 +25,17 @@ from typing import ( Tuple, ) -import xdg +# Use xdg module when it's less painful to have as a dependency + + +class XDG(types.SimpleNamespace): + XDG_CACHE_HOME: str + + +xdg = XDG( + XDG_CACHE_HOME=os.getenv( + 'XDG_CACHE_HOME', + os.path.expanduser('~/.cache'))) Digest16 = NewType('Digest16', str) @@ -468,7 +478,7 @@ def git_revision_name(v: Verification, channel: Channel) -> str: process = subprocess.run(['git', '-C', git_cachedir(channel.git_repo), - 'lo', + 'log', '-n1', '--format=%ct-%h', '--abbrev=11',