logic for working with git-ssb repos
npm install ssb-gitFunctions for working with [git-ssb][] messages.
```
var ssbGit = require('ssb-git')
``
var mergeUpdates = ssbGit.merge
var KVGraph = require('kvgraph')
mergeUpdates is a reduce function, for use with [kvgraph][]'sreduceRight function.
The state reduced is as follows:
``
{
refs: [{name: ref, hash: string, link: Msg, title: string},
refUpdates: {: integer},
}
- refs: list of current refs and their valuesrefUpdates
- : index in refs of which refs are updated. index is -1 if thehead
ref is deleted.
- : ref name for symbolic ref HEAD (the repo's default branch)
```
var linearize = ssbGit.linearize
Use this with [kvgraph][]'s reduceLeft function to get an array of the updates
to a repo.
Copyright (c) 2016 Charles Lehner
Usage of the works is permitted provided that this instrument is
retained with the works, so that any entity that uses the works is
notified of this instrument.
DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
[kvgraph]: %oJnY1QfgTgg+Qhpa7COv5WGWZLohz74+77thqH6tzqU=.sha256
[git-ssb]: %n92DiQh7ietE+R+X/I403LQoyf2DtR3WQfCkDKlheQU=.sha256