MCPcopy Create free account
hub / github.com/Samsung/UTopia / diff

Method diff

helper/git.py:26–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24 self.execute(cmd)
25
26 def diff(self) -> Tuple[List[str], List[str]]:
27 cmd = ["git", "diff", "--name-status"]
28 out = self.execute(cmd)
29 adds = []
30 mods = []
31 for line in out.splitlines():
32 line = line.strip()
33 if not line:
34 continue
35 tokens = line.split()
36 if tokens[0] == "A":
37 adds.append(tokens[1])
38 elif tokens[0] == "M":
39 mods.append(tokens[1])
40 return adds, mods
41
42 def delete_branch(self, branch: str):
43 cmd = ["git", "branch", "-D", branch]

Callers 1

__init__Method · 0.95

Calls 1

executeMethod · 0.95

Tested by

no test coverage detected