codymikol / git-down

A rewrite of the popular project GitUp that works in Linux, Mac, and Windows.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better structure for DiffTree so we traverse up the chain

codymikol opened this issue · comments

Should be

DiffTree: {
    fileDeltaNodes: List<FileDeltaNode>
}

FileDeltaNode: {
  parent: DiffTree
  fileDelta: FileDelta
  hunkNodes: List<HunkNode>
}

HunkNode {
  parent: FileDeltaNode
  hunk: Hunk
  lineNodes: List<LineNode>
}

LineNode {
  parent: HunkNode
  line: Line
}