LibraLibra
LibraLibra
DocsBlogLibra
Getting Started
Architecture
Design
Commands
libra addlibra agentlibra alternateslibra applylibra archivelibra authlibra automationlibra bisectlibra blamelibra branchlibra bundlelibra cachelibra cat-filelibra check-attrlibra check-ignorelibra check-mailmaplibra checkoutlibra cherry-picklibra cleanlibra clonelibra cloudlibra code-controllibra codelibra commit-treelibra commitlibra completionslibra configlibra credentiallibra depslibra describelibra diff-fileslibra diff-indexlibra diff-treelibra difflibra dirtylibra fast-exportlibra fast-importlibra fetchlibra filelibra for-each-reflibra format-patchlibra fscklibra gclibra graphlibra greplibra hash-objectlibra hookslibra hydratelibra index-packlibra initlibra investigatelibra layerlibra lfslibra loglibra logfilelibra loginlibra logoutlibra ls-fileslibra ls-remotelibra ls-treelibra maintenancelibra medialibra merge-baselibra merge-filelibra mergelibra metadatalibra mvlibra noteslibra oplibra openlibra pack-objectslibra packagelibra prunelibra publishlibra pulllibra pushlibra read-treelibra rebaselibra refloglibra remotelibra repacklibra replacelibra rererelibra resetlibra restorelibra rev-listlibra rev-parselibra revertlibra reviewlibra revisionlibra rmlibra sandboxlibra servicelibra shortloglibra show-reflibra showlibra sparse-viewlibra stashlibra statslibra statuslibra switchlibra symbolic-reflibra taglibra update-indexlibra update-reflibra usagelibra verify-packlibra whoamilibra worktreelibra write-tree
API Reference
Policy
Commands

libra diff-tree

Command reference for `libra diff-tree`

Show the differences between two trees — a plumbing entry point that reuses the one diff engine (so output, exit codes, rename and whitespace handling are identical to diff).

Synopsis

libra diff-tree <tree-a> <tree-b> [-- <path>...]

Description

diff-tree is equivalent to libra diff --old <tree-a> --new <tree-b>: it diffs the two tree-ish arguments (commits or tree ids). Path limiters go after --. All diff global flags (--json, --stat, -M, …) apply.

Options

OptionDescriptionExample
<tree-a> <tree-b>The two tree-ish to compare.libra diff-tree HEAD~1 HEAD
-- <path>...Limit the diff to paths.libra diff-tree a b -- src/
--json / --machineStructured diff output (same envelope as diff).libra --json diff-tree a b

Exit codes

CodeMeaning
0No differences.
1There are differences (the diff is printed) — Git plumbing exit convention.
128A tree-ish could not be resolved, or not inside a repository.

Examples

# Diff between a commit and its parent
libra diff-tree HEAD~1 HEAD

# Limit to a directory
libra diff-tree main feature -- src/

Comparison with Git

TaskLibraGit
Diff two treeslibra diff-tree a bgit diff-tree a b

Deferred: single-commit diff-tree <commit> (vs its parent), -r/-t/--stdin, and raw output format. Use libra diff for richer options.

libra diff-index

Command reference for `libra diff-index`

libra diff

Command reference for `libra diff`

On this page

SynopsisDescriptionOptionsExit codesExamplesComparison with Git