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
Retrieve the <status> from the <git>.
Extract the <branch> from the <status: branch>.
Extract the <is-clean> from the <status: clean>.
Extract the <files> from the <status: files>.
Log
Retrieve the <log> from the <git>.
For each <entry> in <log> {
Extract the <hash> from the <entry: short>.
Extract the <msg> from the <entry: message>.
Log "${hash} ${msg}" to the <console>.
}
Stage and Commit
Stage the <files> to the <git> with ".".
Commit the <result> to the <git> with "feat: add feature".
Push / Pull
Pull the <updates> from the <git>.
Push the <result> to the <git>.
Clone
Clone the <repo> from the <git> with {
url: "https://github.com/user/repo.git",
path: "./cloned"
}.
The optional branch: key checks out a specific branch at clone time
instead of the remote's default. Equivalent to git clone --branch <name>:
Clone the <repo> from the <git> with {
url: "https://github.com/user/repo.git",
path: "./cloned",
branch: "develop"
}.
Checkout / Tag
Checkout the <branch> from the <git> with "feature/new".
Tag the <release> for the <git> with "v1.0.0".
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
ARO-0080: Git Actions
Abstract
Native Git actions for ARO, enabling applications to interact with Git
repositories directly from ARO code using libgit2.
System Object:
gitThe
<git>system object represents a Git repository.<git: "/path/to/repo">Actions
<git>Syntax
Status
Log
Stage and Commit
Push / Pull
Clone
The optional
branch:key checks out a specific branch at clone timeinstead of the remote's default. Equivalent to
git clone --branch <name>:Checkout / Tag
Events
git.commitgit.pushgit.pullgit.checkoutgit.taggit.cloneImplementation
Sources/ARORuntime/Git/GitService.swift) — libgit2 wrapperSources/ARORuntime/Git/GitEvents.swift) — event typesSources/ARORuntime/Actions/BuiltIn/GitActions.swift) — action implementationsSources/ARORuntime/Actions/Modules/GitActionsModule.swift) — registration<git>as a source objectPush and Pull shell out to
gitCLI because libgit2 push/pull requirescomplex credential callback setup. All other operations use libgit2 directly.
Backwards Compatibility
Purely additive. No existing actions or syntax are modified.
Canonical source:
Proposals/ARO-0080-git-actions.mdonmain. Edits should be made there.All reactions