MCPcopy
hub / github.com/gitless-vcs/gitless / _status_file

Method _status_file

gitless/core.py:786–799  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

784 return self._status_file(path)[0]
785
786 def _status_file(self, path):
787 _check_path_is_repo_relative(path)
788
789 git_st = self.gl_repo.git_repo.status_file(_get_git_path(path))
790 root = self.gl_repo.root
791 cmd_out = stdout(git('ls-files', '-v', '--full-name', path, _cwd=root))
792 is_au = cmd_out and cmd_out[0] == 'h'
793 if is_au:
794 exists_in_wd = os.path.exists(os.path.join(root, path))
795 f_st = self.FileStatus(
796 path, GL_STATUS_UNTRACKED, True, exists_in_wd, True, False)
797 else:
798 f_st = self.FileStatus(path, *self._st_map[git_st])
799 return f_st, git_st, is_au
800
801 def path_is_ignored(self, path):
802 _check_path_is_repo_relative(path)

Callers 4

status_fileMethod · 0.95
track_fileMethod · 0.95
untrack_fileMethod · 0.95
resolve_fileMethod · 0.95

Calls 4

_get_git_pathFunction · 0.85
status_fileMethod · 0.80
stdoutFunction · 0.70

Tested by

no test coverage detected