history.module
This package holds more than this page lists. See all of its files in its world.
README.md
world_vcs.history
The reads world.diff, world.show, world.log, world.revParse and the checkout and merge calls build on. world_vcs binds it to itself (bind(worldVcs, callerStageName, workingSet)) once it has defined what the reads use.
resolveRev(rev)answers the commit a git-style revision names (HEAD, a branch,origin/<branch>, a commit id or unique prefix, each with~N/^/^2), raising git's message for one that names nothing;historyHolds(commitId, start?)answers whether a commit is in a branch head's history.commitTreeMap(commitId)answers the full tree at a commit, path to entry;resolveCommitPath(commitId, userPath)resolves a user path in it;walkCommitAncestry,lastWriteCommitForandpathHistoryForwalk a commit's ancestry;scenesRewrittenBetween(from, to)names the scenes whosescene.jsondiffers between two trees.diffCommitTrees(a, b)diffs two commits by their trees;enumerateChangedPathsanddiffPathdiff two sources (working,staged,head,commit),diffCandidatePathsnames the paths a status read gives a diff to compare (the working-tree rows the ignore rules match only on request),projectDiff(files, mode)puts a diff in itsstatorname-onlyform, andsourceCommitIdnames the commit a source stands for;stagedActionsandresolveStagedContentread the staging area's side.- A path's side of a diff is a
DiffSide:commitSidebuilds it from a commit's tree entry,stagedSidefrom a staged row,workingFileSidefrom the working tree's bytes andworkingFolderSidefrom a folder asset's recorded version.sameSideandcompareSidescompare two sides by the version each records, else by content address, else by text, so a binary file is compared like a text one, andsideDiffmakes the entry: hunks when both sides hold text, else a binary entry with each side's size.
local History = require("modules.world_vcs.history")
local head = History.resolveRev("HEAD")
for path in pairs(History.commitTreeMap(head)) do print(path) end