Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a1ce01c

Browse files
committed
feat(cygwin): lru-cache generated paths.
1 parent 29526b8 commit a1ce01c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This module is part of GitPython and is released under
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
66
import contextlib
7-
from functools import wraps
7+
from functools import wraps, lru_cache
88
import getpass
99
import logging
1010
import os
@@ -286,6 +286,7 @@ def _cyg_regex_path(drive, path):
286286
)
287287

288288

289+
@lru_cache()
289290
def cygpath(path):
290291
"""Use :meth:`git.cmd.Git.polish_url()` instead, that works on any environment."""
291292
for regex, parser, recurse in _cygpath_parsers:

0 commit comments

Comments
 (0)