def get_output(self, cmd, *args, **kwargs): if cmd.startswith("diff"): return 1 if self.dirty else 0 if cmd == "describe": return self.describe if cmd == "rev-parse": if "--abbrev-ref" in args: return self.branch return self.commitid if cmd == "rev-list": return self.commitid.split() if cmd == "config": return args[1] if cmd == "show-ref": return self._local_tags if cmd == "ls-remote": return self._remote_tags if cmd.startswith("fetch"): return None if cmd.startswith("status"): return self.status_message assert kwargs.get("dryrun") is True return Git.get_output(self, cmd, *args, **kwargs)
def get_output(self, cmd, *args, **kwargs): if cmd == "diff": return 1 if self.dirty else 0 if cmd == "describe": return self.describe if cmd == "rev-parse": if "--abbrev-ref" in args: return self.branch return self.commitid if cmd == "rev-list": return self.commitid.split() if cmd == "config": return args[1] assert kwargs.get("dryrun") is True return Git.get_output(self, cmd, *args, **kwargs)
def get_output(self, cmd, *args, **kwargs): if cmd == 'diff': return 1 if self.dirty else 0 if cmd == 'describe': return self.describe if cmd == 'rev-parse': if '--abbrev-ref' in args: return self.branch return self.commitid if cmd == 'rev-list': return self.commitid.split() if cmd == 'config': return args[1] assert kwargs.get('dryrun') is True return Git.get_output(self, cmd, *args, **kwargs)