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 fast-export

Command reference for `libra fast-export`

Emit the history reachable from a revision as a git fast-import stream — a focused subset of git fast-export. Read-only: it never writes objects or refs.

Synopsis

libra fast-export [<rev>]

Description

fast-export walks the commits reachable from <rev> (default HEAD), oldest-first, and writes a fast-import stream to stdout:

  • each blob is emitted once with a mark;
  • each commit is emitted with its author/committer/data (message), from/merge links to its parents, then deleteall followed by an M line per file — the commit's whole tree is reconstructed rather than diffed against its parent. The stream is larger than Git's diff-based output but byte-for-byte equivalent.

The commits are emitted under the branch ref that <rev> resolves to (refs/heads/<branch> for HEAD / a branch name).

Options

OptionDescriptionExample
<rev>Revision whose reachable commits to export (default HEAD).libra fast-export main

Exit codes

CodeMeaning
0The stream was written.
128Not inside a repository, an unresolvable revision, or an object/IO error.

Examples

# Save the current branch as a stream
libra fast-export > repo.fastimport

# Pipe into another importer
libra fast-export main | git fast-import --quiet   # in another repo

Comparison with Git

TaskLibraGit
Export historylibra fast-export <rev>git fast-export <rev>

Differences and deferred features: the output reconstructs each commit's full tree (deleteall + M list) instead of a parent diff, so it is larger; exporting multiple refs at once, annotated/signed tags, --export-marks / --import-marks, and blob/path filtering are not yet supported.

libra dirty

Command reference for `libra dirty`

libra fast-import

Command reference for `libra fast-import`

On this page

SynopsisDescriptionOptionsExit codesExamplesComparison with Git