diff --git a/git_repository.py b/git_repository.py index a448847..e835384 100644 --- a/git_repository.py +++ b/git_repository.py @@ -42,21 +42,28 @@ class GitRepository(): def tag_annotated(self, annotation: str, message: str): self.system_repository.run_checked('git', 'tag', '-a', annotation, '-m', message) + return self.system_repository.stdout def tag_annotated(self, annotation: str, message: str, count: int): self.system_repository.run_checked('git', 'tag', '-a', annotation, '-m', message, f'HEAD~{count}') + return self.system_repository.stdout def get_current_branch(self): self.system_repository.run_checked('git', 'branch', '--show-current') + return ''.join(self.system_repository.stdout).rstrip() def add_file(self, file_path: Path): self.system_repository.run_checked('git', 'add', file_path) + return self.system_repository.stdout def commit(self, commit_message: str): self.system_repository.run_checked('git', 'commit', '-m', commit_message) + return self.system_repository.stdout def push(self): self.system_repository.run_checked('git', 'push') + return self.system_repository.stdout def checkout(self, branch: str): self.system_repository.run_checked('git', 'checkout', branch) + return self.system_repository.stdout