MCPcopy Index your code
hub / github.com/git/git / git_dir

Function git_dir

git-p4.py:145–153  ·  view source on GitHub ↗

Return TRUE if the given path is a git directory (/path/to/dir/.git). This won't automatically add ".git" to a directory.

(path)

Source from the content-addressed store, hash-verified

143
144
145def git_dir(path):
146 """Return TRUE if the given path is a git directory (/path/to/dir/.git).
147 This won't automatically add ".git" to a directory.
148 """
149 d = read_pipe(["git", "--git-dir", path, "rev-parse", "--git-dir"], True).strip()
150 if not d or len(d) == 0:
151 return None
152 else:
153 return d
154
155
156def chdir(path, is_client_path=False):

Callers 1

isValidGitDirFunction · 0.85

Calls 1

read_pipeFunction · 0.85

Tested by

no test coverage detected