def git_wrapper(path):
 path = os.path.abspath(path)
 if (path not in _wrapper_cache):
  if hasattr(Repo, 'commits'):
   _wrapper_cache[path] = _GitWrapperLegacy(path)
  else:
   _wrapper_cache[path] = _GitWrapper(path)
 return _wrapper_cache[path]

def git_wrapper ( path ) : path = os . path . abspath ( path ) if ( path not in _wrapper_cache ) : if hasattr ( Repo , 'commits' ) : _wrapper_cache [ path ] = _GitWrapperLegacy ( path ) else : _wrapper_cache [ path ] = _GitWrapper ( path ) return _wrapper_cache [ path ]
get appropriate wrapper factory and cache instance for path .