0.5.0 • Published 7 years ago

ssb-git v0.5.0

Weekly downloads
3
License
Fair
Repository
-
Last release
7 years ago

ssb-git

Functions for working with git-ssb messages.

API

var ssbGit = require('ssb-git')

mergeUpdates

var mergeUpdates = ssbGit.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 values
  • refUpdates: 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)

linearize

var linearize = ssbGit.linearize

Use this with kvgraph's reduceLeft function to get an array of the updates to a repo.

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.

0.5.0

7 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.3.0

8 years ago