Пример #1
0
 def checkout(self, check: bool = True, track: bool = False) -> None:
     current_branch = GitOffline.current_branch(self.path)
     if current_branch == self.name:
         CONSOLE.stdout(
             f' - Branch {Format.Git.ref(self.short_ref)} already checked out'
         )
         return
     CONSOLE.stdout(f' - Checkout branch {Format.Git.ref(self.short_ref)}')
     super().checkout(check=check, track=track)
Пример #2
0
 def current_branch(self) -> str:
     return GitOffline.current_branch(self.path)
Пример #3
0
 def is_checked_out(self) -> bool:
     current_branch = GitOffline.current_branch(self.path)
     return current_branch == self.name