MCPcopy Create free account
hub / github.com/modelscope/modelscope / add

Method add

modelscope/hub/git.py:154–160  ·  view source on GitHub ↗
(self,
            repo_dir: str,
            files: Optional[List[str]] = None,
            all_files: bool = False)

Source from the content-addressed store, hash-verified

152 # Add / commit / branch / checkout
153 # ------------------------------------------------------------------
154 def add(self,
155 repo_dir: str,
156 files: Optional[List[str]] = None,
157 all_files: bool = False):
158 if all_files:
159 return self._run_git_command('-C', repo_dir, 'add', '-A')
160 return self._run_git_command('-C', repo_dir, 'add', *(files or []))
161
162 def commit(self, repo_dir: str, message: str):
163 return self._run_git_command('-C', repo_dir, 'commit', '-m',

Callers 4

_scan_dirFunction · 0.45
_scan_cached_repoFunction · 0.45
pushMethod · 0.45
pushMethod · 0.45

Calls 1

_run_git_commandMethod · 0.95

Tested by

no test coverage detected