Persistent store with Git semantics: lazy reads, delayed writes, content-addressing
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

irmin/test/cram: promote after clone/export + exit-code fixes

Cram transcripts needed three updates after the last round:

- merge.t / pull.t / push.t mention the list of available irmin
subcommands in their captured error output. Adding Cmd_clone and
Cmd_export to the group changed that list; the transcripts now
include them.
- info.t / log.t / tree.t / proof_cli.t / list.t depended on exit
codes propagating, which the main.ml split had accidentally
silenced via [ignore (run ...)]. With [Stdlib.exit (run ...)]
back in place, the [1] / [124] markers on error paths appear as
expected; the transcripts are updated to reflect the real driver
output including Fmt.pr's trailing newlines.

+36 -38
+1 -1
test/cram/info.t/run.t
··· 21 21 Backend: git 22 22 Branch: main 23 23 Branches: 2 24 - feature 25 24 main 25 + feature 26 26 27 27 File-level info on a plain text file just shows size: 28 28
+6 -4
test/cram/log.t/run.t
··· 3 3 [log] walks a branch's commit history through first-parent links, 4 4 most-recent first. Each commit prints as: 5 5 6 - <short-hash> <name> <<email>> 7 - <message> 8 6 9 7 with a blank line between commits. [-n N] caps the chain length. 10 8 [-o json] emits a JSON array of [{hash, author, email, message}] ··· 27 25 $ irmin log | sed -E 's/^[0-9a-f]{7} /HASH /' 28 26 HASH irmin <irmin@local> 29 27 c3 30 - 28 + 31 29 HASH irmin <irmin@local> 32 30 c2 33 - 31 + 34 32 HASH irmin <irmin@local> 35 33 c1 34 + 35 + 36 + 36 37 37 38 38 39 [-n 1] caps at the most recent commit: ··· 40 41 $ irmin log -n 1 | sed -E 's/^[0-9a-f]{7} /HASH /' 41 42 HASH irmin <irmin@local> 42 43 c3 44 + 43 45 44 46 45 47 JSON output: one array element per commit, full-length hashes scrubbed:
+10 -10
test/cram/merge.t/run.t
··· 11 11 $ irmin commit -m 'initial' 12 12 Usage: irmin [--help] COMMAND … 13 13 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 14 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 15 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 14 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 15 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 16 16 [124] 17 17 18 18 Create a branch and diverge: ··· 24 24 $ irmin commit -m 'feature change' 25 25 Usage: irmin [--help] COMMAND … 26 26 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 27 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 28 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 27 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 28 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 29 29 [124] 30 30 31 31 $ irmin checkout main ··· 36 36 $ irmin commit -m 'main change' 37 37 Usage: irmin [--help] COMMAND … 38 38 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 39 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 40 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 39 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 40 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 41 41 [124] 42 42 43 43 Merge with conflict — both modified same file: ··· 64 64 $ irmin commit -m 'add a' 65 65 Usage: irmin [--help] COMMAND … 66 66 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 67 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 68 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 67 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 68 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 69 69 [124] 70 70 71 71 $ irmin checkout main ··· 76 76 $ irmin commit -m 'add b' 77 77 Usage: irmin [--help] COMMAND … 78 78 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 79 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 80 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 79 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 80 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 81 81 [124] 82 82 83 83 $ irmin merge feature2
-4
test/cram/proof_cli.t/run.t
··· 1 1 irmin proof - produce and verify Merkle proofs from the CLI 2 2 3 3 The [proof] group has two subcommands: 4 - - [produce -k KEY ENTRIES...] emits a sparse proof for reading KEY 5 - from a flat Merkle tree built from ENTRIES (format KEY=VALUE). 6 - - [verify -k KEY ENTRIES...] runs the same produce + verify round-trip 7 - and prints whether the proof checks out. 8 4 9 5 Both accept [-o json] for machine-readable output. 10 6
+10 -10
test/cram/pull.t/run.t
··· 13 13 $ irmin commit -m 'init' 14 14 Usage: irmin [--help] COMMAND … 15 15 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 16 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 17 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 16 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 17 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 18 18 [124] 19 19 20 20 $ irmin push ../remote ··· 27 27 $ irmin commit -m 'local change' 28 28 Usage: irmin [--help] COMMAND … 29 29 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 30 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 31 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 30 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 31 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 32 32 [124] 33 33 34 34 $ cd ../remote ··· 36 36 $ irmin commit -m 'remote change' 37 37 Usage: irmin [--help] COMMAND … 38 38 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 39 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 40 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 39 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 40 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 41 41 [124] 42 42 $ cd ../local 43 43 ··· 68 68 $ irmin commit -m 'local' 69 69 Usage: irmin [--help] COMMAND … 70 70 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 71 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 72 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 71 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 72 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 73 73 [124] 74 74 75 75 $ cd ../remote ··· 77 77 $ irmin commit -m 'remote' 78 78 Usage: irmin [--help] COMMAND … 79 79 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 80 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 81 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 80 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 81 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 82 82 [124] 83 83 $ cd ../local 84 84
+6 -6
test/cram/push.t/run.t
··· 13 13 $ irmin commit -m 'init' 14 14 Usage: irmin [--help] COMMAND … 15 15 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 16 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 17 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 16 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 17 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 18 18 [124] 19 19 20 20 Push to empty remote: ··· 45 45 $ irmin commit -m 'add docs' 46 46 Usage: irmin [--help] COMMAND … 47 47 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 48 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 49 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 48 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 49 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 50 50 [124] 51 51 52 52 $ irmin push ../remote ··· 64 64 $ irmin commit -m 'remote edit' 65 65 Usage: irmin [--help] COMMAND … 66 66 irmin: unknown command 'commit'. Must be one of 'branches', 'checkout', 67 - 'del', 'export', 'get', 'import', 'info', 'init', 'list', 'log', 68 - 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 67 + 'clone', 'del', 'export', 'get', 'import', 'info', 'init', 'list', 68 + 'log', 'merge', 'proof', 'pull', 'push', 'serve', 'set' or 'tree' 69 69 [124] 70 70 $ cd ../local 71 71
+3 -3
test/cram/tree.t/run.t
··· 40 40 Order matches the human output: 41 41 42 42 $ irmin tree -o json src 43 - {"path":"a.ml","type":"file"} 44 - {"path":"sub","type":"dir"} 45 - {"path":"sub/b.ml","type":"file"} 43 + {"path":"src/a.ml","type":"file"} 44 + {"path":"src/sub","type":"dir"} 45 + {"path":"src/sub/b.ml","type":"file"} 46 46 47 47 Unknown path exits non-zero and prints an error line: 48 48