#!/usr/bin/env dub
/+ dub.sdl:
name "git"
dependency "sparkles:core-cli" path="../../../../.."
targetPath "build"
// Optimised, assertions live, `debug {}` blocks out — the build every nix
// artifact uses. Neither `debug` (which compiles those blocks in) nor
// `release` (which deletes assert *expressions*, side effects included).
buildType "checked" {
buildOptions "optimize" "inline" "debugInfo"
}
+/
// ci: run --help
import (package) sparklessparkles.(package) sparkles.core_clicore_cli.(module) sparkles.core_cli.argsargs;
import (package) sparklessparkles.(package) sparkles.basebase.(module) sparkles.base.prettyprintprettyprint : (alias template) git.prettyPrint = sparkles.base.prettyprint.prettyPrint(T, Hook = void)(in T value, in PrettyPrintOptions!Hook opt = PrettyPrintOptions!Hook())Convenience overload that returns a string.
prettyPrint;
import (package) sparklessparkles.(package) sparkles.basebase.(module) sparkles.base.styled_templateStyle template processing for IES (Interpolated Expression Sequences).
Provides a template syntax for applying terminal styles to IES strings:
import sparkles.base.styled_template;
int cpu = 75;
styledWriteln(i"CPU: {red $(cpu)%} Status: {green OK}");
Supported syntax:
{red text} — Apply single style
{bold.red text} — Chain multiple styles
{bold outer {red nested}} — Nested blocks (inner inherits outer)
{red text {~red normal}} — Negation with ~ removes a style
#{ — Escaped literal {
#} — Escaped literal }
styled_template : (alias template) git.styledWriteln = sparkles.base.styled_template.styledWriteln(Args...)(ColorDepth depth, InterpolationHeader header, Args args, InterpolationFooter footer)Write styled IES to stdout with newline.
styledWriteln;
int int D main(string[] args)main((alias) object.string = stringstring[] (parameter) string[] argsargs) => int sparkles.core_cli.args.internal.runCli!(git.Git)(string[] argv) @systemrunCli!(struct) git.GitGit((parameter) string[] argsargs);
@((struct) sparkles.core_cli.args.uda.CommandCommand("git",
shortDescription: "Distributed version control system",
helpSections: ["description", "examples", "environment", "further-reading"],
))
struct (struct) git.GitGit
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`C`, description: "Run as if git was started in <path> instead of the current working directory"))
(alias) object.string = stringstring (field) string git.Git.directorydirectory;
mixin addSubCommand!Add;
mixin addSubCommand!Branch;
mixin addSubCommand!Checkout;
mixin addSubCommand!Clean;
mixin addSubCommand!Clone;
mixin addSubCommand!Commit;
mixin addSubCommand!Diff;
mixin addSubCommand!Init;
mixin addSubCommand!Log;
mixin addSubCommand!Pull;
mixin addSubCommand!Push;
mixin addSubCommand!Status;
@((struct) sparkles.core_cli.args.uda.CommandCommand("worktree",
shortDescription: "Manage multiple working trees",
helpSections: ["description"],
))
struct (struct) git.Git.WorktreeWorktree
{
@((struct) sparkles.core_cli.args.uda.CommandCommand("add",
shortDescription: "Create a working tree",
helpSections: ["description"],
))
struct (struct) git.Git.Worktree.AddAdd
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`b`))
(alias) object.string = stringstring (field) string git.Git.Worktree.Add.newBranchnewBranch;
@((struct) sparkles.core_cli.args.uda.OptionOption("detach", description: "Detach HEAD at the new working tree"))
bool (field) bool git.Git.Worktree.Add.detachdetach;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("path"))
(alias) object.string = stringstring (field) string git.Git.Worktree.Add.pathpath;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("commit-ish", optional: true))
(alias) object.string = stringstring (field) string git.Git.Worktree.Add.commitishcommitish;
void void git.Git.Worktree.Add.run!(sparkles.core_cli.args.internal.CommandNode!(Git))(in sparkles.core_cli.args.internal.CommandNode!(Git) program) @systemrun(Program)(in (alias) Program = sparkles.core_cli.args.internal.CommandNode!(Git)Program (parameter) const(sparkles.core_cli.args.internal.CommandNode!(Git)) programprogram) =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git worktree add} with params:\n globals: -C='", core.interpolation.InterpolatedExpression!"program.value.directory", string, core.interpolation.InterpolatedLiteral!"'\n params: ", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git worktree add} with params:\n globals: -C='" __param_1, core.interpolation.InterpolatedExpression!"program.value.directory" __param_2, string __param_3, core.interpolation.InterpolatedLiteral!"'\n params: " __param_4, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_5, string __param_6, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git worktree add} with params:
globals: -C='$(program.value.directory)'
params: $(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("list",
shortDescription: "List working tree details",
helpSections: ["description"],
))
struct (struct) git.Git.Worktree.ListList
{
@((struct) sparkles.core_cli.args.uda.OptionOption("porcelain", description: "Machine-readable output"))
bool (field) bool git.Git.Worktree.List.porcelainporcelain;
@((struct) sparkles.core_cli.args.uda.OptionOption(`z`, description: "Terminate records with NUL instead of newline"))
bool (field) bool git.Git.Worktree.List.nulTerminatenulTerminate;
void void git.Git.Worktree.List.run!(sparkles.core_cli.args.internal.CommandNode!(Git))(in sparkles.core_cli.args.internal.CommandNode!(Git) program) @systemrun(Program)(in (alias) Program = sparkles.core_cli.args.internal.CommandNode!(Git)Program (parameter) const(sparkles.core_cli.args.internal.CommandNode!(Git)) programprogram) =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git worktree list} with params:\n globals: -C='", core.interpolation.InterpolatedExpression!"program.value.directory", string, core.interpolation.InterpolatedLiteral!"'\n params: ", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git worktree list} with params:\n globals: -C='" __param_1, core.interpolation.InterpolatedExpression!"program.value.directory" __param_2, string __param_3, core.interpolation.InterpolatedLiteral!"'\n params: " __param_4, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_5, string __param_6, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git worktree list} with params:
globals: -C='$(program.value.directory)'
params: $(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("remove",
shortDescription: "Remove a working tree",
helpSections: ["description"],
))
struct (struct) git.Git.Worktree.RemoveRemove
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`))
bool (field) bool git.Git.Worktree.Remove.forceforce;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("worktree"))
(alias) object.string = stringstring (field) string git.Git.Worktree.Remove.worktreeworktree;
void void git.Git.Worktree.Remove.run!(sparkles.core_cli.args.internal.CommandNode!(Git))(in sparkles.core_cli.args.internal.CommandNode!(Git) program) @systemrun(Program)(in (alias) Program = sparkles.core_cli.args.internal.CommandNode!(Git)Program (parameter) const(sparkles.core_cli.args.internal.CommandNode!(Git)) programprogram) =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git worktree remove} with params:\n globals: -C='", core.interpolation.InterpolatedExpression!"program.value.directory", string, core.interpolation.InterpolatedLiteral!"'\n params: ", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git worktree remove} with params:\n globals: -C='" __param_1, core.interpolation.InterpolatedExpression!"program.value.directory" __param_2, string __param_3, core.interpolation.InterpolatedLiteral!"'\n params: " __param_4, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_5, string __param_6, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git worktree remove} with params:
globals: -C='$(program.value.directory)'
params: $(prettyPrint(this))");
}
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("add",
shortDescription: "Add file contents to the index",
helpSections: ["description"],
))
struct (struct) git.AddAdd
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`A|all`))
bool (field) bool git.Add.allall;
@((struct) sparkles.core_cli.args.uda.OptionOption(`u|update`))
bool (field) bool git.Add.updateupdate;
@((struct) sparkles.core_cli.args.uda.OptionOption(`p|patch`))
bool (field) bool git.Add.patchpatch;
@((struct) sparkles.core_cli.args.uda.OptionOption(`n|dry-run`))
bool (field) bool git.Add.dryRundryRun;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("pathspec", optional: true))
(alias) object.string = stringstring[] (field) string[] git.Add.pathspecspathspecs;
void void git.Add.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git add} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git add} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git add} with params:\n$(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("commit",
shortDescription: "Record changes to the repository",
helpSections: ["description"],
))
struct (struct) git.CommitCommit
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`m|message`))
(alias) object.string = stringstring (field) string git.Commit.messagemessage;
@((struct) sparkles.core_cli.args.uda.OptionOption(`a|all`))
bool (field) bool git.Commit.allall;
@((struct) sparkles.core_cli.args.uda.OptionOption(`v|verbose`))
bool (field) bool git.Commit.verboseverbose;
@((struct) sparkles.core_cli.args.uda.OptionOption("amend", description: "Amend the last commit"))
bool (field) bool git.Commit.amendamend;
void void git.Commit.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git commit} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git commit} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git commit} with params:\n$(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("push",
shortDescription: "Update remote refs along with associated objects",
helpSections: ["description"],
))
struct (struct) git.PushPush
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`u|set-upstream`))
bool (field) bool git.Push.setUpstreamsetUpstream;
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`))
bool (field) bool git.Push.forceforce;
@((struct) sparkles.core_cli.args.uda.OptionOption("tags", description: "Push all tags"))
bool (field) bool git.Push.tagstags;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("repository", optional: true))
(alias) object.string = stringstring (field) string git.Push.repositoryrepository;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("refspec", optional: true))
(alias) object.string = stringstring[] (field) string[] git.Push.refspecsrefspecs;
void void git.Push.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git push} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git push} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git push} with params:\n$(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("pull",
shortDescription: "Fetch from and integrate with another repository or a local branch",
helpSections: ["description"],
))
struct (struct) git.PullPull
{
@((struct) sparkles.core_cli.args.uda.OptionOption("rebase", description: "Fetch from and integrate with another repository or a local branch"))
bool (field) bool git.Pull.rebaserebase;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("repository", optional: true))
(alias) object.string = stringstring (field) string git.Pull.repositoryrepository;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("refspec", optional: true))
(alias) object.string = stringstring[] (field) string[] git.Pull.refspecsrefspecs;
void void git.Pull.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git pull} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git pull} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git pull} with params:\n$(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("status",
shortDescription: "Show the working tree status",
helpSections: ["description"],
))
struct (struct) git.StatusStatus
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`s|short`))
bool (field) bool git.Status.short_short_;
@((struct) sparkles.core_cli.args.uda.OptionOption(`b|branch`))
bool (field) bool git.Status.branchbranch;
void void git.Status.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git status} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git status} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git status} with params:\n$(prettyPrint(this))");
}
struct (struct) git.CommitFormatOptionsCommitFormatOptions
{
@((struct) sparkles.core_cli.args.uda.OptionOption("oneline", description: "Shorten commit hash and show only the first line of the commit message"))
bool (field) bool git.CommitFormatOptions.onelineoneline;
@((struct) sparkles.core_cli.args.uda.OptionOption("graph", description: "Show an ASCII graph of the commit history"))
bool (field) bool git.CommitFormatOptions.graphgraph;
@((struct) sparkles.core_cli.args.uda.OptionOption(`p|patch`))
bool (field) bool git.CommitFormatOptions.patchpatch;
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("log",
shortDescription: "Show commit logs",
helpSections: ["description"],
))
struct (struct) git.LogLog
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`n|max-count`))
int (field) int git.Log.maxCountmaxCount = -1;
@(struct) sparkles.core_cli.args.uda.FlattenUDA to flatten a nested struct of CLI options into the parent command struct.
When a struct field is annotated with @Flatten``, its fields participate in
option parsing, short-option bundling, positional argument assignment, and
validation as if they were declared directly on the enclosing command.
Flatten("Format Options")
(struct) git.CommitFormatOptionsCommitFormatOptions (field) git.CommitFormatOptions git.Log.formatformat;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("revision-range", optional: true))
(alias) object.string = stringstring (field) string git.Log.revisionRangerevisionRange;
void void git.Log.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git log} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git log} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git log} with params:\n$(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("branch",
shortDescription: "List, create, or delete branches",
helpSections: ["description"],
))
struct (struct) git.BranchBranch
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`a|all`))
bool (field) bool git.Branch.allall;
@((struct) sparkles.core_cli.args.uda.OptionOption(`d|delete`))
bool (field) bool git.Branch.delete_delete_;
@((struct) sparkles.core_cli.args.uda.OptionOption(`D`))
bool (field) bool git.Branch.forceDeleteforceDelete;
@((struct) sparkles.core_cli.args.uda.OptionOption(`m|move`))
bool (field) bool git.Branch.movemove;
@((struct) sparkles.core_cli.args.uda.OptionOption(`r|remotes`))
bool (field) bool git.Branch.remotesremotes;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("branchname", optional: true))
(alias) object.string = stringstring (field) string git.Branch.branchNamebranchName;
void void git.Branch.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git branch} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git branch} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git branch} with params:\n$(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("checkout",
shortDescription: "Switch branches or restore working tree files",
helpSections: ["description"],
))
struct (struct) git.CheckoutCheckout
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`b`))
(alias) object.string = stringstring (field) string git.Checkout.newBranchnewBranch;
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`))
bool (field) bool git.Checkout.forceforce;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("branch-or-commit", optional: true))
(alias) object.string = stringstring (field) string git.Checkout.targettarget;
void void git.Checkout.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git checkout} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git checkout} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git checkout} with params:\n$(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("diff",
shortDescription: "Show changes between commits, commit and working tree, etc",
helpSections: ["description"],
))
struct (struct) git.DiffDiff
{
@((struct) sparkles.core_cli.args.uda.OptionOption("cached", description: "Show differences between index and last commit"))
bool (field) bool git.Diff.cachedcached;
@((struct) sparkles.core_cli.args.uda.OptionOption("staged", description: "Alias for --cached"))
bool (field) bool git.Diff.stagedstaged;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("pathspec", optional: true))
(alias) object.string = stringstring[] (field) string[] git.Diff.pathspecspathspecs;
void void git.Diff.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git diff} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git diff} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git diff} with params:\n$(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("init",
shortDescription: "Create an empty Git repository or reinitialize an existing one",
helpSections: ["description"],
))
struct (struct) git.InitInit
{
@((struct) sparkles.core_cli.args.uda.OptionOption("bare", description: "Create a bare repository"))
bool (field) bool git.Init.barebare;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("directory", optional: true))
(alias) object.string = stringstring (field) string git.Init.directorydirectory;
void void git.Init.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git init} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git init} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git init} with params:\n$(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("clone",
shortDescription: "Clone a repository into a new directory",
helpSections: ["description"],
))
struct (struct) git.CloneClone
{
@((struct) sparkles.core_cli.args.uda.OptionOption("depth", description: "Create a shallow clone with a history truncated to the specified number of commits"))
int (field) int git.Clone.depthdepth;
@((struct) sparkles.core_cli.args.uda.OptionOption("recursive", description: "After the clone is created, initialize all submodules within"))
bool (field) bool git.Clone.recursiverecursive;
@((struct) sparkles.core_cli.args.uda.OptionOption(`b`))
(alias) object.string = stringstring (field) string git.Clone.branchbranch;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("repository"))
(alias) object.string = stringstring (field) string git.Clone.repositoryrepository;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("directory", optional: true))
(alias) object.string = stringstring (field) string git.Clone.directorydirectory;
void void git.Clone.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git clone} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git clone} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git clone} with params:\n$(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("clean",
shortDescription: "Remove untracked files from the working tree",
helpSections: ["description", "interactive mode"],
))
struct (struct) git.CleanClean
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`d`))
bool (field) bool git.Clean.deleteDirectoriesdeleteDirectories;
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`))
bool (field) bool git.Clean.forceforce;
@((struct) sparkles.core_cli.args.uda.OptionOption(`i|interactive`))
bool (field) bool git.Clean.interactiveinteractive;
@((struct) sparkles.core_cli.args.uda.OptionOption(`n|dry-run`))
bool (field) bool git.Clean.dryRundryRun;
@((struct) sparkles.core_cli.args.uda.OptionOption(`q|quiet`))
bool (field) bool git.Clean.quietquiet;
@((struct) sparkles.core_cli.args.uda.OptionOption(`e|exclude`))
(alias) object.string = stringstring (field) string git.Clean.excludePatternexcludePattern;
@((struct) sparkles.core_cli.args.uda.OptionOption(`x`))
bool (field) bool git.Clean.deleteUntrackeddeleteUntracked;
@((struct) sparkles.core_cli.args.uda.OptionOption(`X`))
bool (field) bool git.Clean.deleteIgnoreddeleteIgnored;
void void git.Clean.run()run() =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold git clean} with params:\n", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold git clean} with params:\n" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_2, string __param_3, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold git clean} with params:\n$(prettyPrint(this))");
}