Kale VCS
Distributed Content-Addressable Version Control
A fast, transparent distributed version control system designed to be 100% written in Kale. Features a custom pure-Kale SHA-1 cryptographic engine, immutable content-addressable object store (blob, tree, commit), staging index file format with binary checksums, and two-way file diffing.


Sub-Millisecond Multi-Cursor Editing
Unlike line-array or gap-buffer architectures, the Kale Piece Table holds an immutable original file buffer coupled with an append-only edit buffer. Loading a 100MB file takes under 1ms because no memory copying occurs.
import "vcs/sha1.kl" as sha1;
import "vcs/object_store.kl" as store;
import "vcs/index.kl" as index;
fn create_commit(repo_path: string, author: string, message: string) -> string {
let idx: index.Index = index.read_index(repo_path);
let root_tree_hash: string = store.write_tree_from_index(&idx);
let parent_hash: string = store.get_head_commit(repo_path);
let commit_hash: string = store.write_commit(
root_tree_hash,
parent_hash,
author,
message
);
store.update_ref(repo_path, "refs/heads/master", commit_hash);
return commit_hash;
}Deterministic command-line invocations to build, link native dynamic dependencies, and run automated regression tests:
kale build vcs/main.kl -o bin/kale_vcs.exe./bin/kale_vcs.exe init./bin/kale_vcs.exe add ../bin/kale_vcs.exe commit -m 'Initial Kale release'./bin/kale_vcs.exe logGPG Key 1B917D4779A6102E • Continuous integration with automated symbol verification.
Zero external dependencies for SHA-1 hash calculation, tree hashing, and signature generation.
Stores blobs, trees, and commit manifests in content-addressable objects indexed by 40-character hex hashes.
Full suite of porcelain commands: init, add, commit, status, log, and diff.