예제 #1
0
 def set_worktree(self, worktree):
     self.git.set_worktree(worktree)
     is_valid = self.git.is_valid()
     if is_valid:
         cwd = self.git.getcwd()
         self.project = os.path.basename(cwd)
         self.set_directory(cwd)
         core.chdir(cwd)
         gitcfg.current().reset()
     return is_valid
예제 #2
0
파일: cmds.py 프로젝트: achernet/git-cola
 def do(self):
     git = self.model.git
     old_worktree = git.worktree()
     if not self.model.set_worktree(self.repo_path):
         self.model.set_worktree(old_worktree)
         return
     new_worktree = git.worktree()
     core.chdir(new_worktree)
     self.model.set_directory(self.repo_path)
     _config.reset()
     self.model.update_status()
예제 #3
0
 def do(self):
     git = self.model.git
     old_worktree = git.worktree()
     if not self.model.set_worktree(self.repo_path):
         self.model.set_worktree(old_worktree)
         return
     new_worktree = git.worktree()
     core.chdir(new_worktree)
     self.model.set_directory(self.repo_path)
     _config.reset()
     self.model.update_status()
예제 #4
0
 def do(self):
     git = self.model.git
     old_worktree = git.worktree()
     if not self.model.set_worktree(self.repo_path):
         self.model.set_worktree(old_worktree)
         return
     new_worktree = git.worktree()
     core.chdir(new_worktree)
     self.model.set_directory(self.repo_path)
     cfg = gitcfg.current()
     cfg.reset()
     inotify.stop()
     inotify.start()
     self.model.update_status()
예제 #5
0
파일: cmds.py 프로젝트: Plenoge/git-cola
 def do(self):
     git = self.model.git
     old_worktree = git.worktree()
     if not self.model.set_worktree(self.repo_path):
         self.model.set_worktree(old_worktree)
         return
     new_worktree = git.worktree()
     core.chdir(new_worktree)
     self.model.set_directory(self.repo_path)
     cfg = gitcfg.current()
     cfg.reset()
     inotify.stop()
     inotify.start()
     self.model.update_status()