From 6e9fda06df1754f58c347e44a4579d059dfd36f0 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 23 Nov 2023 15:59:02 -0800 Subject: Add documentation for the --hashes option --- doc/ledger.1 | 13 ++++++++++++- doc/ledger3.texi | 9 +++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/ledger.1 b/doc/ledger.1 index f64be720..febfaf1e 100644 --- a/doc/ledger.1 +++ b/doc/ledger.1 @@ -1,4 +1,4 @@ -.Dd March 15, 2019 +.Dd November 23, 2023 .Dt LEDGER 1 .Os .Sh NAME @@ -634,6 +634,17 @@ Set the format for the headers that separate reports section of a grouped report. Only has effect with a .Fl \-group-by Ar EXPR register report. +.It Fl \-hashes Ar ALGO +Record the hash of each transaction in a +.Ar Hash +metadata value, according to the hashing algorithm given by the +.Ar ALGO +argument. Note that if a +.Ar Hash +metadata value is explicitly provided and does not match what would +have been generated, an error is reported. Hashes depend on previous +entries, such that setting a single hash value is sufficient to +guarantee the shape of the entire history leading up to that entry. .It Fl \-head Ar INT Print the first .Ar INT diff --git a/doc/ledger3.texi b/doc/ledger3.texi index 02680caa..b4f3baab 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -6755,6 +6755,15 @@ $ ledger reg Expenses --group-by "payee" --group-title-format "----------------- ... @end smallexample +@item --hashes @var{ALGO} +Record the hash of each transaction in a @var{Hash} metadata value, +according to the hashing algorithm given by the @var{ALGO} +argument. Note that if a @var{Hash} metadata value is explicitly +provided and does not match what would have been generated, an error is +reported. Hashes depend on previous entries, such that setting a single +hash value is sufficient to guarantee the shape of the entire history +leading up to that entry. + @item --head @var{INT} @itemx --first @var{INT} Print the first @var{INT} entries. Opposite of @option{--tail -- cgit v1.2.3