MCPcopy Index your code
hub / github.com/emscripten-core/emsdk / GIT

Function GIT

emsdk.py:739–766  ·  view source on GitHub ↗
(must_succeed=True)

Source from the content-addressed store, hash-verified

737# If true, the search is required to succeed, and the execution
738# will terminate with sys.exit(1) if not found.
739def GIT(must_succeed=True):
740 global cached_git_executable
741 if cached_git_executable is not None:
742 return cached_git_executable
743 # The order in the following is important, and specifies the preferred order
744 # of using the git tools. Primarily use git from emsdk if installed. If not,
745 # use system git.
746 gits = ['git/1.9.4/bin/git.exe', shutil.which('git')]
747 for git in gits:
748 try:
749 ret, _stdout, _stderr = run_get_output([git, '--version'])
750 if ret == 0:
751 cached_git_executable = git
752 return git
753 except Exception:
754 pass
755 if must_succeed:
756 if WINDOWS:
757 msg = "git executable was not found. Please install it by typing 'emsdk install git-1.9.4', or alternatively by installing it manually from http://git-scm.com/downloads . If you install git manually, remember to add it to PATH"
758 elif MACOS:
759 msg = "git executable was not found. Please install git for this operation! This can be done from http://git-scm.com/ , or by installing XCode and then the XCode Command Line Tools (see http://stackoverflow.com/questions/9329243/xcode-4-4-command-line-tools )"
760 elif LINUX:
761 msg = "git executable was not found. Please install git for this operation! This can be probably be done using your package manager, see http://git-scm.com/book/en/Getting-Started-Installing-Git"
762 else:
763 msg = "git executable was not found. Please install git for this operation!"
764 exit_with_error(msg)
765 # Not found
766 return ''
767
768
769def git_repo_version(repo_path):

Callers 5

git_repo_versionFunction · 0.85
git_recent_commitsFunction · 0.85
get_git_remotesFunction · 0.85
git_cloneFunction · 0.85
git_pullFunction · 0.85

Calls 2

run_get_outputFunction · 0.85
exit_with_errorFunction · 0.85

Tested by

no test coverage detected