ssb-git
Utility functions for git-ssb.
API
mergeUpdates
var mergeUpdates = require('ssb-git/merge')
var KVGraph = require('kvgraph')
mergeUpdates
is a reduce function, for use with kvgraph's
reduceRight
function.
The state reduced is as follows:
{
refs: [{name: ref, hash: string, link: Msg, title: string},
refUpdates: {<ref>: integer},
}
refs
: list of current refs and their valuesrefUpdates
: index in refs
of which refs are updated. index is -1 if the
ref is deleted.head
: ref name for symbolic ref HEAD
(the repo's default branch)
License
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.