chenlei1983 commited on
Commit
d013f47
1 Parent(s): 328ca09

Update git_commd.py

Browse files
Files changed (1) hide show
  1. git_commd.py +3 -3
git_commd.py CHANGED
@@ -20,7 +20,7 @@ class GitCommandWrapper(metaclass=Singleton):
20
  """
21
  default_git_path = 'git' # The default git command line
22
  git_path='git'
23
- MASTER_MODEL_BRANCH="main"
24
  def __init__(self, path: str = None):
25
  self.git_path = path or self.default_git_path
26
 
@@ -178,7 +178,7 @@ class GitCommandWrapper(metaclass=Singleton):
178
  def pull(self,
179
  repo_dir: str,
180
  remote: str = 'origin',
181
- branch: str = 'master'):
182
  cmds = ['-C', repo_dir, 'pull', remote, branch]
183
  return self._run_git_command(*cmds)
184
 
@@ -222,7 +222,7 @@ class GitCommandWrapper(metaclass=Singleton):
222
  repo_dir: str,
223
  tag_name: str,
224
  message: str,
225
- ref: str = MASTER_MODEL_BRANCH):
226
  cmd_args = [
227
  '-C', repo_dir, 'tag', tag_name, '-m',
228
  '"%s"' % message, ref
 
20
  """
21
  default_git_path = 'git' # The default git command line
22
  git_path='git'
23
+ MODEL_BRANCH="main"
24
  def __init__(self, path: str = None):
25
  self.git_path = path or self.default_git_path
26
 
 
178
  def pull(self,
179
  repo_dir: str,
180
  remote: str = 'origin',
181
+ branch: str = 'main'):
182
  cmds = ['-C', repo_dir, 'pull', remote, branch]
183
  return self._run_git_command(*cmds)
184
 
 
222
  repo_dir: str,
223
  tag_name: str,
224
  message: str,
225
+ ref: str = MODEL_BRANCH):
226
  cmd_args = [
227
  '-C', repo_dir, 'tag', tag_name, '-m',
228
  '"%s"' % message, ref