2

I want to process the graph that represents my git repo, similar to output of git log --graph.

Are there tools that can generate an output as a kind of an object, e.g. as JSON or something that can be processed by a program easier than parsing the raw output of git log?

Sergei Basharov
  • 51,276
  • 73
  • 200
  • 335
  • This may help: http://stackoverflow.com/a/4600561/2295034 – Jonathan.Brink Apr 05 '17 at 13:18
  • Use `git rev-list --parents `. The output is *n* lines long: one for each commit node reachable from the given start points, followed by its parent node IDs separated by white-space. In other words each line is the identity of the vertex in the graph, followed by the identities of each outgoing arc for that vertex. (Use `--all` to get every `refs/*` reference as a starting point. This omits reflog entries but otherwise gets you everything—possibly excluding `HEAD` itself in some Git versions). – torek Apr 05 '17 at 18:29

0 Answers0