def METHOD_NAME(source, dest, root):
  _prepareDestDir(dest)
  # checkout git into temporary directory in our build root
  # this is needed if we are interested only in git subtree
  tmpdir = __salt__['temp.dir'](parent=root)
  rev = 'master'
  subdir = None
  url = None
  # parse git uri - i.e. git@github.com/repo/#rev:sub
  # compatible with docker as per https://docs.docker.com/engine/reference/commandline/build/#git-repositories
  try:
    url, fragment = source.split('#', 1)
    try:
      rev, subdir = fragment.split(':', 1)
    except:
      rev = fragment
  except:
    url = source
  # omitted rev means default 'master' branch revision
  if rev == '':
    rev = 'master'
  log.debug('GIT URL: {0}, Revision: {1}, subdir: {2}'.format(url, rev, subdir))
  __salt__['git.init'](tmpdir)
  __salt__['git.remote_set'](tmpdir, url)
  __salt__['git.fetch'](tmpdir)
  __salt__['git.checkout'](tmpdir, rev=rev)
  if subdir:
    if _isLocal(os.path.join(tmpdir, subdir)):
      __salt__['file.symlink'](os.path.join(tmpdir, subdir), dest)
    else:
      raise salt.exceptions.SaltException('Directory is not present in checked out source: {}'.format(subdir))
  else:
    __salt__['file.symlink'](tmpdir, dest)
  return dest