Pass env to get_vcs_revs()

This commit is contained in:
Kovid Goyal 2020-05-01 08:03:31 +05:30
parent 1a2da5c49d
commit f66dbf111d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -349,7 +349,7 @@ def run_tool(cmd: Union[str, List[str]], desc: Optional[str] = None) -> None:
raise SystemExit(ret)
def get_vcs_rev_defines() -> List[str]:
def get_vcs_rev_defines(env: Env) -> List[str]:
ans = []
if os.path.exists('.git'):
try:
@ -368,7 +368,7 @@ def get_vcs_rev_defines() -> List[str]:
return ans
SPECIAL_SOURCES: Dict[str, Tuple[str, Union[List[str], Callable[[], Union[List[str], Iterator[str]]]]]] = {
SPECIAL_SOURCES: Dict[str, Tuple[str, Union[List[str], Callable[[Env], Union[List[str], Iterator[str]]]]]] = {
'kitty/parser_dump.c': ('kitty/parser.c', ['DUMP_COMMANDS']),
'kitty/data-types.c': ('kitty/data-types.c', get_vcs_rev_defines),
}