From 08ded8196b3fe339faa082c1e353f81bf1ccdda3 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Sun, 14 Dec 2014 23:41:30 +0000 Subject: [PATCH] manual: describe hook directives. Signed-off-by: brian m. carlson --- doc/manual.adoc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/manual.adoc b/doc/manual.adoc index ddc5290..96714e2 100644 --- a/doc/manual.adoc +++ b/doc/manual.adoc @@ -109,6 +109,26 @@ Column directives indicate how many columns to use to display fields. A column directive consists of a record with the values `col` and an integer number of columns. +==== Hook Directives (`txn`) + +Hook directives indicate a series of hooks to be run on each load or save +operation. Several different hooks are available. The default set of hooks is +`hash`. This provides an SHA-2 hash of the data in the `dtb.checksum` file, and +cannot be disabled, only replaced with a specific algorithm. + +By default, the hash is `sha256` on 32-bit systems and `sha512` on 64-bit +systems; `sha384` is also available. If a specific algorithm is specified, it +overrides the `hash` default. Older versions of newfol only supported the +`sha256` algorithm. + +The other available hook is `git`. This hook performs a commit every time the +file is saved, and a git checkout of the `dtb` file before every load. This +allows a user to keep a history of the data and to easily back it up to another +location. + +A hook directive consists of a record starting with the value `txn`, and +followed by a list of hook names. + === Configuration File Configuration files are identical to schema files except that instead of the