You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log/show/diff/grep/blame/notes/reflog family vs git: log --notes silently ignored, show rejects ^{tree}, diff-tree can't emit raw plumbing format, grep/log regex-default mismatch, shortlog rejects ranges, reflog bare flags rejected; apply is check-only #478
Divergence: --grep is a regex in libra, Git is default fixed-string (POSIX basic regex via --extended-regexp selection; plain --grep=foo in Git matches substring literally). libra's rev-list --grep help says "using a regular expression" — a pattern containing regex metacharacters (e.g. --grep "c++ (fix)") behaves differently from Git. Git parity needs fixed-string default + --extended-regexp/--fixed-strings selectors (missing).
Divergence: log --format does not honor --notes/%N, and --notes flag on log verified inconsistent (git log --notes embeds notes; libra log -1 --notes produced no Notes block with a note present — see notes section).
--all order differs from Git (libra emits reverse-chronological but interleaves ranges differently with --graph); hard to pin without a stable tiebreak — low priority.
Divergence: show HEAD^{tree} fails (fatal: bad revision 'HEAD^{tree}', exit 129) while rev-parse HEAD^{tree} resolves the same expression fine. Git prints the tree listing. The ^{tree}/^{commit} peel suffix is supported in rev-parse but not in show's revision resolver — inconsistent peeling between two libra commands.
diff --cached with no HEAD (fresh repo) — untested edge in libra suite; Git handles (diffs against empty tree). Low risk.
diff-tree default output is patch format (diff --git …), but Git's diff-tree defaults to raw (:000000 100755 …) unless -p. Scripts consuming raw plumbing output will misparse. -r, --name-only, --raw flags are missing on libra diff-tree (unexpected argument '-r'), so the Git raw plumbing format is unreachable entirely.
apply is --check only ("actually applying the patch is not yet supported" per help) — so the am pipeline is the only way to apply patches; --stat, -R, --3way, --index, --exclude all absent. This is the biggest functional gap in the patch workflow (Git t4100-t4150 families).
grep
Basic -n, -c, -e, -i, -v, --max-count verified working with path:line:content output.
--fixed-strings missing (same regex-default problem as log --grep); -E, -P, -w, --and/--or boolean expressions, --untracked, --no-index, -p/--show-function, -<n> context lines, --heading, --break unimplemented (spot-checked several; --untracked accepted but verified only as no-op for untracked search). Git's t7810 is the reference suite.
blame
blame <file> (line-annotated), --porcelain verified; output header format matches Git's (<author> <date> <lineno>) shape; -L <n>,<m> verified with proper error for out-of-range (Invalid range 1,2 (total lines: 1) — Git instead clamps/errors differently: fatal: file … has only 1 lines; exit differs 129 vs 128 — cosmetic).
Divergence: shortlog <range> rejects HEAD~2..HEAD (failed to resolve revision 'HEAD~2..HEAD': invalid reference) while plain log HEAD~2..HEAD and shortlog HEAD work. Range support in shortlog's resolver lags log's.
describe
describe, --tags, --long (v0.9-0-g<sha>, matches Git), --dirty verified; --match, --exclude, --first-parent, --abbrev=<n>, --candidates exist per help (spot-checked --long/--dirty only). Good parity.
notes
add -m, show, list, remove, append -m verified; ref stored as refs/notes/commits like Git.
Divergence: log --notes does not render the note (Git appends a Notes: block). git log --notes is a documented output modifier; libra's log accepts --notes silently but the note body never appears — silent misbehavior, worse than rejecting the flag.
reflog, reflog show <ref>, --number N, --grep, --stat, --patch, --no-abbrev (via show subcommand spelling only — bare reflog -3/--grep/--date/-n are rejected: unexpected argument), expire --all verified.
Divergence: Git exposes reflog -n/--date/--grep on the bare command AND reflog show; libra only on the subcommand.libra reflog -3 (documented Git reflex) errors. Also --date=iso missing entirely — timestamps print in a fixed format, scripts parsing dates can't request ISO.
format-patch -1 (writes 0001-cfb.patch), --stdout (mbox From …, Subject: [PATCH] … headers) verified; --cover-letter, -o, --numbered, --start-number, --thread, --signature, --subject-prefix exist per help (spot-checked -1/--stdout).
am verified applying a libra-generated patch; guards (cannot start am with staged or tracked changes, no am operation is in progress for --abort/--skip/--continue) match Git semantics.
Divergence: am refuses a patch that doesn't apply with patch does not apply to 'cf.txt' exit 0 (!) — the fatal error printed but process exit was 0 in one observation path; re-ran and got correct behavior on a clean tree. Flaky exit-code propagation around am failures worth a test. (mailinfo requires explicit <PATCH> argument; Git's mailinfo takes <msg> <patch> two-output form — libra's single-arg form diverges; undocumented.)
fast-export / fast-import / bundle
Cross-tool interop verified: libra fast-export --all piped into git fast-import produced valid Git commits (git log lists them). Big win; the stream format is compatible for the basic blob/mark/data/commit features.
bundle create/verify/list-heads verified, Git-compatible headers (The bundle uses this hash algorithm: sha1 from git bundle verify on a libra bundle is the acid test — not yet cross-verified; libra bundle verify of a libra bundle passes; a git bundle verify /tmp/.../l.bundle cross-check is needed and cheap). unbundle exists; --quiet, --progress, --version=<n> unverified.
--objects missing (rev-list --objects HEAD silently printed commits only — the flag was accepted? Actually output shows plain commit list; --objects/--objects-edge/--disk-usage/--no-walk are absent: --no-walk errored unexpected argument). Git plumbing consumers (gc, pack scripts) rely on these; libra's own pack-objects path uses internal APIs so impact is contained to user scripts.
Test gaps vs Git
t4202-log (grep/regex semantics, --notes rendering), t7810-grep (fixed-strings, boolean combinators), t8001-blame (-M/-C/-w), t4150-am (exit-code propagation on failure), t6000-rev-list (--objects/--no-walk), t1410-reflog (bare-command flag parity, --date) — the strongest gaps, each mapped above.
Add a cross-tool round-trip test: libra fast-export → git fast-import → git fsck (the happy path already works; a regression test locks it).
Summary
Comparison of
log / show / diff / diff-tree / diff-index / diff-files / grep / blame / shortlog / describe / notes / reflog / apply / format-patch / am / mailinfo / fast-export / fast-import / bundle / for-each-ref / rev-list(libra 0.22.5 vs git 2.55), flag-by-flag, run in/run/media/genedna/data/tmp/cmp.log
--oneline,--format/--prettyplaceholders (%h %an %s),--stat,--graph,-p,--name-only,--name-status,--grep,--author,--committer,--since/--until,-n,--skip,--reverse,--first-parent,--all, rangemain..feat,--follow(accepted),-<n>(issue [r2cn-测试任务] 修复[libra] 不支持 log -<n> 语法 #183 fixed).--grepis a regex in libra, Git is default fixed-string (POSIX basic regex via--extended-regexpselection; plain--grep=fooin Git matches substring literally). libra'srev-list --grephelp says "using a regular expression" — a pattern containing regex metacharacters (e.g.--grep "c++ (fix)") behaves differently from Git. Git parity needs fixed-string default +--extended-regexp/--fixed-stringsselectors (missing).log --formatdoes not honor--notes/%N, and--notesflag on log verified inconsistent (git log --notesembeds notes; libralog -1 --notesproduced no Notes block with a note present — see notes section).--allorder differs from Git (libra emits reverse-chronological but interleaves ranges differently with--graph); hard to pin without a stable tiebreak — low priority.show
show <commit>,--stat,--format,show <tag>(annotated tag object header — issue [r2cn-测试任务]libra showdoes not display annotated tag information correctly #178 fixed),show HEAD:<path>blob output — verified.show HEAD^{tree}fails (fatal: bad revision 'HEAD^{tree}', exit 129) whilerev-parse HEAD^{tree}resolves the same expression fine. Git prints the tree listing. The^{tree}/^{commit}peel suffix is supported in rev-parse but not in show's revision resolver — inconsistent peeling between two libra commands.diff family
--stat,--numstat,--shortstat,--name-only,--patch,-U<n>,--cached,HEAD~1 HEAD, path limiters,--exit-code,--quiet,--color=never,--word-diff,--patience(accepted),--binary(accepted),--check(accepted).--dirstatmissing (unexpected argument). Git'st4004covers it; libra gap.diff --cachedwith no HEAD (fresh repo) — untested edge in libra suite; Git handles (diffs against empty tree). Low risk.diff-treedefault output is patch format (diff --git …), but Git'sdiff-treedefaults to raw (:000000 100755 …) unless-p. Scripts consuming raw plumbing output will misparse.-r,--name-only,--rawflags are missing onlibra diff-tree(unexpected argument '-r'), so the Git raw plumbing format is unreachable entirely.diff-index/diff-filesverified producing patch format withScanning working tree …progress noise on stdout path (issue diff: "Scanning working tree ..." progress line fires for a ~30 ms local op and is not TTY-gated under --progress auto #466 covers TTY-gating of the progress line).applyis --check only ("actually applying the patch is not yet supported" per help) — so theampipeline is the only way to apply patches;--stat,-R,--3way,--index,--excludeall absent. This is the biggest functional gap in the patch workflow (Gitt4100-t4150families).grep
-n,-c,-e,-i,-v,--max-countverified working withpath:line:contentoutput.--fixed-stringsmissing (same regex-default problem as log --grep);-E,-P,-w,--and/--orboolean expressions,--untracked,--no-index,-p/--show-function,-<n>context lines,--heading,--breakunimplemented (spot-checked several;--untrackedaccepted but verified only as no-op for untracked search). Git'st7810is the reference suite.blame
blame <file>(line-annotated),--porcelainverified; output header format matches Git's(<author> <date> <lineno>)shape;-L <n>,<m>verified with proper error for out-of-range (Invalid range 1,2 (total lines: 1)— Git instead clamps/errors differently:fatal: file … has only 1 lines; exit differs 129 vs 128 — cosmetic).-w(ignore whitespace),-M/-C(move/copy detection),--date=,--incremental,-e/--show-email. Git'st8001/t8002cover these.shortlog
-s,-n,-e(emails) verified; output7 Tformatting matches Git.shortlog <range>rejectsHEAD~2..HEAD(failed to resolve revision 'HEAD~2..HEAD': invalid reference) while plainlog HEAD~2..HEADandshortlog HEADwork. Range support in shortlog's resolver lags log's.describe
describe,--tags,--long(v0.9-0-g<sha>, matches Git),--dirtyverified;--match,--exclude,--first-parent,--abbrev=<n>,--candidatesexist per help (spot-checked--long/--dirtyonly). Good parity.notes
add -m,show,list,remove,append -mverified; ref stored asrefs/notes/commitslike Git.log --notesdoes not render the note (Git appends aNotes:block).git log --notesis a documented output modifier; libra'slogaccepts--notessilently but the note body never appears — silent misbehavior, worse than rejecting the flag.notes merge,notes prune,notes get-ref,-C/-creuse.reflog
reflog,reflog show <ref>,--number N,--grep,--stat,--patch,--no-abbrev(viashowsubcommand spelling only — barereflog -3/--grep/--date/-nare rejected:unexpected argument),expire --allverified.reflog -n/--date/--grepon the bare command ANDreflog show; libra only on the subcommand.libra reflog -3(documented Git reflex) errors. Also--date=isomissing entirely — timestamps print in a fixed format, scripts parsing dates can't request ISO.reflog delete,reflog existsmissing.t1410coverage gap.format-patch / am / mailinfo
format-patch -1(writes0001-cfb.patch),--stdout(mboxFrom …,Subject: [PATCH] …headers) verified;--cover-letter,-o,--numbered,--start-number,--thread,--signature,--subject-prefixexist per help (spot-checked-1/--stdout).amverified applying a libra-generated patch; guards (cannot start am with staged or tracked changes,no am operation is in progressfor --abort/--skip/--continue) match Git semantics.amrefuses a patch that doesn't apply withpatch does not apply to 'cf.txt'exit 0 (!) — the fatal error printed but process exit was 0 in one observation path; re-ran and got correct behavior on a clean tree. Flaky exit-code propagation around am failures worth a test. (mailinforequires explicit<PATCH>argument; Git'smailinfotakes<msg> <patch>two-output form — libra's single-arg form diverges; undocumented.)fast-export / fast-import / bundle
libra fast-export --allpiped intogit fast-importproduced valid Git commits (git log lists them). Big win; the stream format is compatible for the basic blob/mark/data/commit features.fast-importreads--input <FILE>or stdin; no positional argument (Git'sgit fast-import <file>reflex errors:unexpected argument '/path' found); no--dry-run;--max-count,--quietexist. Git's--force,--quiet,--stats,--big-file-threshold, checkpoint/progress/feature directives unverified.bundle create/verify/list-headsverified, Git-compatible headers (The bundle uses this hash algorithm: sha1from git bundle verify on a libra bundle is the acid test — not yet cross-verified; libra bundle verify of a libra bundle passes; agit bundle verify /tmp/.../l.bundlecross-check is needed and cheap).unbundleexists;--quiet,--progress,--version=<n>unverified.rev-list
--count,--reverse,--skip,--first-parent,--boundary,--author/--grep/--since/--until,--merges/--no-merges,--left-right,--cherry-pick/--cherry-mark/--cherry,--parents,--children,--timestamp.--objectsmissing (rev-list --objects HEADsilently printed commits only — the flag was accepted? Actually output shows plain commit list;--objects/--objects-edge/--disk-usage/--no-walkare absent:--no-walkerroredunexpected argument). Git plumbing consumers (gc, pack scripts) rely on these; libra's own pack-objects path uses internal APIs so impact is contained to user scripts.Test gaps vs Git
t4202-log(grep/regex semantics, --notes rendering),t7810-grep(fixed-strings, boolean combinators),t8001-blame(-M/-C/-w),t4150-am(exit-code propagation on failure),t6000-rev-list(--objects/--no-walk),t1410-reflog(bare-command flag parity, --date) — the strongest gaps, each mapped above.