git_dart 0.2.0
git_dart: ^0.2.0 copied to clipboard
Git in pure Dart: objects and packs, refs, the index and working tree, merge, rebase and stash, and clone, fetch and push. No git binary, no FFI.
Changelog #
0.2.0 #
pushworks over ssh andgit://as well as local paths and HTTP(S), taking ansshCommandasfetchdoes. Over those duplex transports the server's progress and hook output reachonProgressvia side-band.merge(and cherry-pick, revert, rebase and stash, which share it) now detects renames like git'sortstrategy: an edit follows a file renamed on the other side, and rename/rename, rename/delete and rename/add conflicts are staged as git stages them. Honoursmerge.renames,diff.renamesandmerge.renameLimit; directory renames are not detected. A conflict where one side deleted the file now leaves the surviving version in the working tree without markers, as git does.pairRenamesexposes rename pairing over a precomputed change list.- Clean/smudge filter drivers (
filter=<driver>in.gitattributes) are applied when staging, in status, and wherever blobs are written to the working tree (checkout, reset, restore, stash, merge), in git's order relative to eol conversion. Drivers come fromfilter.<driver>.clean/.smudgeconfig commands, or in-process fromRepository.filters/FilterDriver.registry(the only option on the web). Stash, restore and merge now also apply eol conversion, which they previously skipped. - Client-side hooks: commits, merges, checkouts, rebases and pushes run
pre-commit,prepare-commit-msg,commit-msg,post-commit,pre-merge-commit,post-merge,post-checkout,pre-rebaseandpre-pushas git does, honouringcore.hooksPath, withnoVerifyoptions and a replaceableRepository.hooksrunner (HookRunner.disk,.none,.inProcess). A refusing hook throwsHookFailedExceptionwith its output. - Signed commits and tags:
Repository.verifyCommit/verifyTagcheck OpenPGP, X.509 and SSH signatures withgpg,gpgsmorssh-keygen, reaching the verdictsgit verify-commitand%G?do;commitIndex,commitTreeandcreateTagsign on request or percommit.gpgSign/tag.gpgSign, in thegpg.formatconfigured.SignatureToollets an app supply its own signer; on the web the default throwsUnsupportedError. - API docs no longer carry broken references.
0.1.1 #
- Web is now a supported platform on pub.dev. The ssh and
git://transports (SshConnection,DaemonConnection) andIoGitFswere the only parts importingdart:iounconditionally; they now come from conditional imports, with browser stand-ins that throw a clearUnsupportedError. splitSshCommandis available as a top-level function.
0.1.0 #
First release.
- Objects and storage: loose objects, packs with both delta kinds, alternates, commit-graph.
- Refs: loose and packed refs, the reflog, revision syntax, branches, tags, upstreams and ahead/behind counts.
- Index and working tree: staging, commits, status, checkout, reset,
.gitignore,.gitattributes, sparse checkout, linked worktrees, and submodules (read). - Diff: tree diff with exact and similarity rename detection, line diffs, blame and file history.
- History: three-way merge, rebase, cherry-pick, revert and stash.
- Packs: writing with delta compression, repack and gc.
- Transfer: clone, fetch and push over HTTP(S), ssh,
git://and local paths; protocol v0 and v2; shallow and partial clones; force-with-lease. - Bundles, and tar and zip archives.
- Config reading and writing.
- Runs in a browser with an in-memory filesystem, OPFS storage and an application-supplied HTTP client.