MCPcopy Index your code
hub / github.com/ReZeroS/git / run

Method run

src/main/java/club/qqtim/command/Show.java:26–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 private String id;
25
26 @Override
27 public void run() {
28 final CommitObject commit = Commit.getCommit(id);
29
30 String parentTree = null;
31 if (Objects.nonNull(commit.getParents()) && !commit.getParents().isEmpty()) {
32 parentTree = Commit.getCommit(commit.getParents().get(0)).getTree();
33 }
34
35 Log.printCommit(id, commit);
36
37 final String result = DiffUtil.diffTrees(
38 ReadTree.getTree(parentTree), ReadTree.getTree(commit.getTree())
39 );
40
41 log.info(result);
42 }
43}

Callers

nothing calls this directly

Calls 4

getCommitMethod · 0.95
getTreeMethod · 0.95
printCommitMethod · 0.95
diffTreesMethod · 0.95

Tested by

no test coverage detected