git_dart 0.3.1
git_dart: ^0.3.1 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.3.1 #
- New
abortApply, which abandons a cherry-pick or revert that stopped on conflicts: the index and working tree go back to where it started and the sequencer state andMERGE_MSGare removed. Rebase already hadabortRebase. continueApplyandcontinueRebasetake an optionalmessage, which replaces the stopped commit's own, as editing it on--continuedoes.continueApplyrefuses when the operation in progress is a rebase, instead of finishing one step of it as though it were a cherry-pick.
0.3.0 #
RemoteStore.renamenow does whatgit remote renamedoes: the tracking refs (loose and packed) and their reflogs move to the new name, the fetch refspecs are rewritten,pushurland other settings are kept, and branches whoseremoteorpushRemotenamed the old remote follow it. It previously removed the remote and added it back, which dropped all of these. Renaming onto an existing remote is refused.Repository.setUpstreamwrites into an existing[branch "<name>"]section instead of appending another one, so setting it twice no longer leaves twobranch.<name>.mergevalues. It refuses a branch that does not exist.- New
Repository.unsetUpstream, asgit branch --unset-upstream.
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.