command

package
v0.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

README

Zeta commands

TODO

Documentation

Index

Constants

View Source
const (
	Byte int64 = 1 << (iota * 10)
	KiByte
	MiByte
	GiByte
	TiByte
	PiByte
	EiByte
)

Variables

View Source
var (
	ErrSyntaxSize        = errors.New("size synatx error")
	ErrFlagsIncompatible = errors.New("flags incompatible")
)
View Source
var (
	ErrArgRequired = errors.New("arg required")
)
View Source
var (
	W = tr.W // translate func wrap
)

Functions

func ExpiryDateDecoder

func ExpiryDateDecoder() kong.MapperFunc

expiry-date

func SizeDecoder

func SizeDecoder() kong.MapperFunc

Types

type Add

type Add struct {
	ALL      bool     `name:"all" short:"A" help:"Add changes from all tracked and untracked files"`
	DryRun   bool     `name:"dry-run" short:"n" help:"Dry run"`
	Update   bool     `name:"update" short:"u" help:"Update tracked files"`
	Chmod    string   `name:"chmod" help:"Override the executable bit of the listed files" placeholder:"(+|-)x"`
	PathSpec []string `arg:"" optional:"" name:"pathspec" help:"Path specification, similar to Git path matching mode"`
}

Add file contents to the index

func (*Add) Run

func (a *Add) Run(g *Globals) error

type Branch

type Branch struct {
	ShowCurrent bool     `name:"show-current" help:"Show current branch name"`
	List        bool     `name:"list" short:"l" help:"List branches. With optional <pattern>..."`
	Copy        bool     `name:"copy" short:"c" help:"Copy a branch and its reflog"`
	ForceCopy   bool     `name:":force-copy" short:"C" help:"Copy a branch, even if target exists"`
	Delete      bool     `name:"delete" short:"d" help:"Delete fully merged branch"`
	ForceDelete bool     `name:":force-delete" short:"D" help:"Delete branch (even if not merged)"`
	Move        bool     `name:"move" short:"m" help:"Move/rename a branch and its reflog"`
	ForceMove   bool     `name:":force-move" short:"M" help:"Move/rename a branch, even if target exists"`
	Force       bool     `name:"force" short:"f" help:"Force creation, move/rename, deletion"`
	Args        []string `arg:"" optional:"" name:"args" help:"Branch args: <branchname>, <pattern>, <start-point>"`
}

func (*Branch) IsDelete

func (b *Branch) IsDelete() bool

func (*Branch) IsForceCopy

func (b *Branch) IsForceCopy() bool

func (*Branch) IsForceDelete

func (b *Branch) IsForceDelete() bool

func (*Branch) IsForceMove

func (b *Branch) IsForceMove() bool

func (*Branch) IsMove

func (b *Branch) IsMove() bool

func (*Branch) Run

func (b *Branch) Run(g *Globals) error

func (*Branch) Summary

func (b *Branch) Summary() string

type Cat

type Cat struct {
	Hash        string `arg:"" name:"object" help:"The name of the object to show"`
	WriteMax    int64  `` /* 137-byte string literal not displayed */
	T           bool   `name:"type" short:"t" help:"Show object type"`
	DisplaySize bool   `name:":" short:"s" help:"Show object size"`
	JSON        bool   `name:"json" short:"j" help:"Returns data as JSON; limited to commits, trees, fragments, and tags"`
	Textconv    bool   `name:"textconv" help:"Output text as Unicode; blobs only"`
	Verify      bool   `name:"verify" help:"Verify object hash"`
}

func (*Cat) Run

func (c *Cat) Run(g *Globals) error

type CheckIgnore

type CheckIgnore struct {
	Stdin bool     `name:"stdin" help:"Read file names from stdin"`
	Z     bool     `name:":z" short:"z" help:"Terminate input and output records by a NUL character"`
	JSON  bool     `name:"json" short:"j" help:"Data will be returned in JSON format"`
	Paths []string `arg:"" name:"pathname" optional:"" help:"Pathname given via the command-line"`
}

func (*CheckIgnore) Run

func (c *CheckIgnore) Run(g *Globals) error

func (*CheckIgnore) Summary

func (c *CheckIgnore) Summary() string

type Checkout

type Checkout struct {
	UnresolvedArgs []string `arg:"" optional:"" hidden:""`
	Branch         string   `name:"branch" short:"b" help:"Direct the new HEAD to the <name> branch after checkout"`
	TagName        string   `name:"tag" short:"t" help:"Direct the new HEAD to the <name> tag's commit after checkout"`
	Commit         string   `name:"commit" help:"Direct the new HEAD to the <commit> branch after checkout"`
	Sparse         []string `name:"sparse" short:"s" help:"A subset of repository files, all files are checked out by default" type:"string"`
	Limit          int64    `` /* 143-byte string literal not displayed */
	Batch          bool     `name:"batch" help:"Get and checkout files for each provided on stdin"`
	Snapshot       bool     `name:"snapshot" help:"Checkout a non-editable snapshot"`
	Depth          int      `name:"depth" help:"Create a shallow clone with a history truncated to the specified number of commits" default:"1"`
	One            bool     `name:"one" help:"Checkout large files one after another"`
	Quiet          bool     `name:"quiet" help:"Operate quietly. Progress is not reported to the standard error stream"`
	// contains filtered or unexported fields
}

func (*Checkout) Passthrough

func (c *Checkout) Passthrough(paths []string)

func (*Checkout) Run

func (c *Checkout) Run(g *Globals) error

func (*Checkout) Summary

func (c *Checkout) Summary() string

type Clean

type Clean struct {
	DryRun bool `name:"dry-run" short:"n" help:"dry run"`
	Force  bool `name:"force" short:"f" help:"force"`
	Dir    bool `name:":dir" short:"d" help:"Remove whole directories"`
	ALL    bool `name:":all" short:"x" help:"Remove ignored files, too"`
}

func (*Clean) Run

func (c *Clean) Run(g *Globals) error

type Commit

type Commit struct {
	Message           []string `name:"message" short:"m" help:"Use the given as the commit message. Concatenate multiple -m options as separate paragraphs"`
	File              string   `name:"file" short:"F" help:"Take the commit message from the given file. Use - to read the message from the standard input"`
	All               bool     `name:"all" short:"a" help:"Automatically stage modified and deleted files, but newly untracked files remain unaffected"`
	AllowEmpty        bool     `name:"allow-empty" help:"Allow creating a commit with the exact same tree structure as its parent commit"`
	AllowEmptyMessage bool     `name:"allow-empty-message" help:"Like --allow-empty this command is primarily for use by foreign SCM interface scripts"`
	Amend             bool     `name:"amend" help:"Replace the tip of the current branch by creating a new commit"`
}

func (*Commit) Run

func (c *Commit) Run(g *Globals) error

type Config

type Config struct {
	Args   []string `` /* 141-byte string literal not displayed */
	System bool     `name:"system" help:"Use system config file"`
	Global bool     `name:"global" help:"Only read or write to global ~/.zeta.toml"`
	Local  bool     `name:"local" help:"Only read or write to repository .zeta/zeta.toml, which is the default behavior when writing"`
	Unset  bool     `name:"unset" short:"u" help:"Remove the line matching the key from config file"`
	List   bool     `name:"list" short:"l" help:"List all variables set in config file, along with their values"`
	Get    bool     `name:"get" help:"Get the value for a given Key"`
	GetALL bool     `name:"get-all" help:"Get all values for a given Key"`
	Add    bool     `name:"add" help:"Add a new variable: name value"`
	Z      bool     `name:":z" short:"z" help:"Terminate values with NUL byte"`
	Type   string   `` /* 154-byte string literal not displayed */
}

func (*Config) Run

func (c *Config) Run(g *Globals) error

type Debuger

type Debuger interface {
	DbgPrint(format string, args ...any)
}

type Diff

type Diff struct {
	NameOnly      bool   `name:"name-only" help:"Show only names of changed files"`
	NameStatus    bool   `name:"name-status" help:"Show names and status of changed files"`
	Numstat       bool   `name:"numstat" help:"Show numeric diffstat instead of patch"`
	Stat          bool   `name:"stat" help:"Show diffstat instead of patch"`
	ShortStat     bool   `name:"shortstat" help:"Output only the last line of --stat format"`
	Z             bool   `name:":z" short:"z" help:"Output diff-raw with lines terminated with NUL"`
	Staged        bool   `name:"staged" help:"Compare the differences between the staging area and <revision>"`
	Cached        bool   `name:"cached" help:"Compare the differences between the staging area and <revision>"`
	Textconv      bool   `name:"textconv" help:"Convert text to Unicode and compare differences"`
	MergeBase     string `name:"merge-base" help:"If --merge-base is given, use the common ancestor of <commit> and HEAD instead"`
	Output        string `name:"output" help:"Output to a specific file instead of stdout" placeholder:"<file>"`
	Histogram     bool   `name:"histogram" help:"Generate a diff using the \"Histogram diff\" algorithm"`
	ONP           bool   `name:"onp" help:"Generate a diff using the \"O(NP) diff\" algorithm"`
	Myers         bool   `name:"myers" help:"Generate a diff using the \"Myers diff\" algorithm"`
	Patience      bool   `name:"patience" help:"Generate a diff using the \"Patience diff\" algorithm"`
	Minimal       bool   `name:"minimal" help:"Spend extra time to make sure the smallest possible diff is produced"`
	DiffAlgorithm string `name:"diff-algorithm" help:"Choose a diff algorithm, supported: histogram|onp|myers|patience|minimal"`
	From          string `arg:"" optional:"" name:"from" help:"Revision from"`
	To            string `arg:"" optional:"" name:"to" help:"Revision to"`
	// contains filtered or unexported fields
}

func (*Diff) NewLine

func (c *Diff) NewLine() byte

func (*Diff) NewOptions

func (c *Diff) NewOptions() (*zeta.DiffOptions, error)

func (*Diff) NewOutput added in v0.15.0

func (c *Diff) NewOutput(ctx context.Context) (io.WriteCloser, bool, error)

func (*Diff) Passthrough

func (c *Diff) Passthrough(paths []string)

func (*Diff) Run

func (c *Diff) Run(g *Globals) error

func (*Diff) Summary

func (c *Diff) Summary() string

type Fetch

type Fetch struct {
	Name      string `arg:"" optional:"" name:"name" help:"Reference or commit to be downloaded"`
	Unshallow bool   `name:"unshallow" help:"Get complete history"`
	Tag       bool   `name:"tag" short:"t" help:"Download tags instead of branches only when refname is incomplete"` //
	Limit     int64  ``                                                                                              /* 143-byte string literal not displayed */
	Force     bool   `name:"force" short:"f" help:"Override reference update check"`
}

In the design of HugeSCM, we have abandoned the philosophy of git where the retrieval of repository data should be minimalistic, that is, to fetch only what is needed. Therefore, when implementing the fetch feature, it's important to adhere to the principle that zeta fetch will not support fetching all data at once, but will only support fetching specific reference metadata and particular objects.

func (*Fetch) Run

func (c *Fetch) Run(g *Globals) error

func (*Fetch) Summary

func (c *Fetch) Summary() string

type ForEachRef

type ForEachRef struct {
	JSON    bool     `name:"json" short:"j" help:"Data will be returned in JSON format"`
	Sort    string   `name:"sort" help:"Field name to sort on"`
	Pattern []string `arg:"" optional:"" name:"pattern" help:"If given, only refs matching at least one pattern are shown"`
}

func (*ForEachRef) Run

func (c *ForEachRef) Run(g *Globals) error

type GC

type GC struct {
	Prune int64 `` /* 161-byte string literal not displayed */
	Quiet bool  `name:"quiet" help:"Operate quietly. Progress is not reported to the standard error stream"`
}

func (*GC) Run

func (c *GC) Run(g *Globals) error

type Globals

type Globals struct {
	Verbose bool        `short:"V" name:"verbose" help:"Make the operation more talkative"`
	Version VersionFlag `short:"v" name:"version" help:"Show version number and quit"`
	Values  []string    `short:"X" name:":config" help:"Override default configuration, format: <key>=<value>"`
	CWD     string      `name:"cwd" help:"Set the path to the repository worktree"`
}

func (*Globals) DbgPrint

func (g *Globals) DbgPrint(format string, args ...any)

type HashObject

type HashObject struct {
	W     bool   `name:":w" short:"w" help:"Write the object into the object database"`
	Stdin bool   `name:"stdin" help:"Read the object from stdin"`
	Path  string `name:"path" help:"Process file as it were from this path"`
}

func (*HashObject) Run

func (c *HashObject) Run(g *Globals) error

type Init

type Init struct {
	Branch    string `name:"branch" short:"b" help:"Override the name of the initial branch" default:"mainline"`
	Remote    string `name:"remote" help:"Initialize and start tracking a new repository"`
	Directory string `arg:"" name:"directory" help:"Repository directory"`
}

func (*Init) Run

func (c *Init) Run(g *Globals) error

type Log

type Log struct {
	RevisionRange string `arg:"" optional:"" name:"revision-range" help:"Revision range"`
	JSON          bool   `name:"json" short:"j" help:"Data will be returned in JSON format"`
	// contains filtered or unexported fields
}

func (*Log) Passthrough

func (c *Log) Passthrough(paths []string)

func (*Log) Run

func (c *Log) Run(g *Globals) error

func (*Log) Summary

func (c *Log) Summary() string

type LsFiles

type LsFiles struct {
	Cached   bool     `name:"cached" short:"c" help:"Show cached files in the output (default)"`
	Deleted  bool     `name:"deleted" short:"d" help:"Show deleted files in the output"`
	Modified bool     `name:"modified" short:"m" help:"Show modified files in the output"`
	Others   bool     `name:"others" short:"o" help:"Show other files in the output"`
	Stage    bool     `name:"stage" short:"s" help:"Show staged contents' object name in the output"`
	Z        bool     `name:":z" short:"z" help:"Terminate entries with NUL byte"`
	JSON     bool     `name:"json" short:"j" help:"Data will be returned in JSON format"`
	Paths    []string `arg:"" name:"path" optional:"" help:"Given paths, show as match patterns; else, use root as sole argument"`
}

func (*LsFiles) Run

func (c *LsFiles) Run(g *Globals) error

type LsTree

type LsTree struct {
	OnlyTrees bool     `name:":only-trees" short:"d" help:"Only show trees"`
	Recurse   bool     `name:":recurse" short:"r" help:"Recurse into subtrees"`
	Tree      bool     `name:":tree" short:"t" help:"Show trees when recursing"`
	Z         bool     `name:":z" short:"z" help:"Terminate entries with NUL byte"`
	Long      bool     `name:"long" short:"l" help:"Include object size"`
	NameOnly  bool     `name:"name-only" alias:"name-status" help:"List only filenames"`
	Abbrev    int      `name:"abbrev" help:"Use <n> digits to display object names"`
	JSON      bool     `name:"json" short:"j" help:"Data will be returned in JSON format"`
	Revision  string   `arg:"" name:"tree-ish" help:"ID of a tree-ish"`
	Paths     []string `arg:"" name:"path" optional:"" help:"Given paths, show as match patterns; else, use root as sole argument"`
}

func (*LsTree) NewLine

func (c *LsTree) NewLine() byte

func (*LsTree) Run

func (c *LsTree) Run(g *Globals) error

List the contents of a tree object

type Merge

type Merge struct {
	Revision                string   `arg:"" optional:"" name:"revision" help:"Merge specific revision into HEAD"`
	FF                      bool     `name:"ff" negatable:"" help:"Allow fast-forward" default:"true"`
	FFOnly                  bool     `name:"ff-only" help:"Abort if fast-forward is not possible"`
	Squash                  bool     `name:"squash" help:"Create a single commit instead of doing a merge"`
	AllowUnrelatedHistories bool     `name:"allow-unrelated-histories" help:"Allow merging unrelated histories"`
	Textconv                bool     `name:"textconv" help:"Convert text to Unicode before merging"`
	Message                 []string `name:"message" short:"m" help:"Merge commit message (for a non-fast-forward merge)"`
	File                    string   `name:"file" short:"F" help:"Read message from file"`
	Signoff                 bool     `name:"signoff" negatable:"" help:"Add a Signed-off-by trailer" default:"false"`
	Abort                   bool     `name:"abort" help:"Abort a conflicting merge"`
	Continue                bool     `name:"continue" help:"Continue a merge with resolved conflicts"`
}

Join two or more development histories together

func (*Merge) Run

func (c *Merge) Run(g *Globals) error

func (*Merge) Summary

func (c *Merge) Summary() string

type MergeBase

type MergeBase struct {
	// --is-ancestor
	All        bool     `name:"all" short:"a" negatable:"" default:"false" help:"Output all common ancestors"`
	IsAncestor bool     `name:"is-ancestor" help:"Is the first one ancestor of the other?"`
	Args       []string `arg:"" name:"commit"`
}

func (*MergeBase) Run

func (c *MergeBase) Run(g *Globals) error

func (*MergeBase) Summary

func (c *MergeBase) Summary() string

type MergeTree

type MergeTree struct {
	Branch1                 string `arg:"" name:"branch1" help:"branch1"`
	Branch2                 string `arg:"" name:"branch2" help:"branch2"`
	MergeBase               string `name:"merge-base" help:"Specify a merge-base for the merge"`
	AllowUnrelatedHistories bool   `name:"allow-unrelated-histories" help:"If branches lack common history, merge-tree errors. Use this flag to force merge"`
	NameOnly                bool   `name:"name-only" help:"Only output conflict-related file names"`
	Textconv                bool   `name:"textconv" help:"Convert text to Unicode before merging"`
	Z                       bool   `name:":z" short:"z" help:"Terminate entries with NUL byte"`
	JSON                    bool   `name:"json" help:"Convert conflict results to JSON"`
}

func (*MergeTree) Run

func (c *MergeTree) Run(g *Globals) error

type Pull

type Pull struct {
	FF        bool  `name:"ff" negatable:"" help:"Allow fast-forward" default:"true"`
	FFOnly    bool  `name:"ff-only" help:"Abort if fast-forward is not possible"`
	Rebase    bool  `name:"rebase" help:"Incorporate changes by rebasing rather than merging"`
	Squash    bool  `name:"squash" help:"Create a single commit instead of doing a merge"`
	Unshallow bool  `name:"unshallow" help:"Get complete history"`
	One       bool  `name:"one" help:"Checkout large files one after another"`
	Limit     int64 `` /* 143-byte string literal not displayed */
}

func (*Pull) Run

func (c *Pull) Run(g *Globals) error

type Push

type Push struct {
	Refspec     string   `arg:"" optional:"" name:"refspec" default:"" help:"Specify what destination ref to update with what source object"`
	PushOptions []string `name:"push-option" short:"o" help:"Option to transmit"`
	Tag         bool     `name:"tag" short:"t" help:"Update remote tag reference"`
	Force       bool     `name:"force" short:"f" help:"force updates"`
}

func (*Push) Run

func (c *Push) Run(g *Globals) error

type Rebase

type Rebase struct {
	Onto     string `name:"onto" help:"Rebase onto given branch"`
	Abort    bool   `name:"abort" help:"Abort and checkout the original branch"`
	Continue bool   `name:"continue" help:"Continue"`
}

func (*Rebase) Run

func (c *Rebase) Run(g *Globals) error

type Remote

type Remote struct {
	Show ShowRemote `cmd:"show" help:"Gives some information about the remote" default:"1"`
	Set  SetRemote  `cmd:"set" help:"Set URL for the remote"`
}

type Remove

type Remove struct {
	DryRun   bool     `name:"dry-run" short:"n" help:"Dry run"`
	Quiet    bool     `name:"quiet" short:"q" help:"Do not list removed files"`
	Cached   bool     `name:"cached" help:"Only remove from the index"`
	Force    bool     `name:"force" short:"f" help:"Override the up-to-date check"`
	Recurse  bool     `name:":recurse" short:"r" help:"Allow recursive removal"`
	PathSpec []string `arg:"" optional:"" name:"pathspec" help:"Path specification, similar to Git path matching mode"`
}

func (*Remove) Run

func (c *Remove) Run(g *Globals) error

type Reset

type Reset struct {
	Revision string `arg:"" optional:"" name:"commit" help:"Resets the current branch head to <commit>"`
	Mixed    bool   `name:"mixed" help:"Reset HEAD and index"`
	Soft     bool   `name:"soft" help:"Reset only HEAD"`
	Hard     bool   `name:"hard" help:"Reset HEAD, index and working tree, changes discarded"`
	Merge    bool   `name:"merge" help:"Reset HEAD, index and working tree"`
	Keep     bool   `name:"keep" help:"Reset HEAD but keep local changes"`
	Fetch    bool   `name:"fetch" help:"Fetch missing objects"`
	One      bool   `name:"one" help:"Checkout large files one after another, --hard mode only"`
	Limit    int64  `` /* 143-byte string literal not displayed */
	Quiet    bool   `name:"quiet" help:"Operate quietly. Progress is not reported to the standard error stream"`
	// contains filtered or unexported fields
}

Reset current HEAD to the specified state

func (*Reset) Passthrough

func (c *Reset) Passthrough(paths []string)

func (*Reset) ResetMode

func (c *Reset) ResetMode() zeta.ResetMode

func (*Reset) Run

func (c *Reset) Run(g *Globals) error

func (*Reset) Summary

func (c *Reset) Summary() string

type Restore

type Restore struct {
	Source   string   `name:"source" short:"s" help:"Which tree-ish to checkout from"`
	Staged   bool     `name:"staged" short:"S" negatable:"" help:"Restore the index"`
	Worktree bool     `name:"worktree" short:"W" negatable:"" help:"Restore the working tree (default)"`
	Paths    []string `arg:"" optional:"" name:"pathspec" help:"Limits the paths affected by the operation"`
}

func (*Restore) Help

func (c *Restore) Help() string

func (*Restore) Run

func (c *Restore) Run(g *Globals) error

type RevParse

type RevParse struct {
	ShowToplevel bool `name:"show-toplevel" help:"Show the working tree's root path (absolute by default)"`
	ZetaDir      bool `name:"zeta-dir" help:"Show the path to the .zeta directory"`
}

func (*RevParse) Run

func (c *RevParse) Run(g *Globals) error

type SetRemote

type SetRemote struct {
	URL string `arg:"" name:"url" help:"URL for the remote"`
}

Set or replace remote

func (*SetRemote) Run

func (c *SetRemote) Run(g *Globals) error

type ShowRemote

type ShowRemote struct {
	JSON bool `name:"json" short:"j" help:"Data will be returned in JSON format"`
}

func (*ShowRemote) Run

func (c *ShowRemote) Run(g *Globals) error

type Stash

type Stash struct {
	Push  StashPush  `cmd:"push" help:"Stash local changes and revert to HEAD" default:"1"`
	List  StashList  `cmd:"list" help:"List the stash entries that you currently have"`
	Show  StashShow  `cmd:"show" help:"Displays the diff of changes in a stash entry against the commit where it was created"`
	Clear StashClear `cmd:"clear" help:"Remove all the stash entries"`
	Drop  StashDrop  `cmd:"drop" help:"Remove a single stash entry from the list of stash entries"`
	Pop   StashPop   `cmd:"pop" help:"Apply and remove one stash"`
	Apply StashApply `cmd:"apply" help:"Like pop, but do not remove the state from the stash list"`
}

type StashApply

type StashApply struct {
	Stash string `arg:"" optional:"" name:"stash" help:"Stash index" default:"stash@{0}"`
}

func (*StashApply) Run

func (c *StashApply) Run(g *Globals) error

type StashClear

type StashClear struct {
}

func (*StashClear) Run

func (c *StashClear) Run(g *Globals) error

type StashDrop

type StashDrop struct {
	Stash string `arg:"" optional:"" name:"stash" help:"Stash index" default:"stash@{0}"`
}

func (*StashDrop) Run

func (c *StashDrop) Run(g *Globals) error

type StashList

type StashList struct {
}

func (*StashList) Run

func (c *StashList) Run(g *Globals) error

type StashPop

type StashPop struct {
	Index bool   `name:"index" negatable:"" help:"Attempt to recreate the index"`
	Stash string `arg:"" optional:"" name:"stash" help:"Stash index" default:"stash@{0}"`
}

stash@{1}

func (*StashPop) Run

func (c *StashPop) Run(g *Globals) error

type StashPush

type StashPush struct {
	U bool `name:"include-untracked" short:"u" help:"Stashed untracked files with push/save, then cleaned with zeta clean"`
}

func (*StashPush) Run

func (c *StashPush) Run(g *Globals) error

type StashShow

type StashShow struct {
	IncludeUntracked bool   `name:"include-untracked"`
	Stash            string `arg:"" optional:"" name:"stash" help:"Stash index" default:"stash@{0}"`
}

func (*StashShow) Run

func (c *StashShow) Run(g *Globals) error

type Status

type Status struct {
	Short bool `name:"short" short:"s" help:"Give the output in the short-format"`
	Z     bool `name:":z" short:"z" help:"Terminate entries with NUL byte"`
}

func (*Status) NewLine

func (s *Status) NewLine() byte

func (*Status) Run

func (s *Status) Run(g *Globals) error

type Switch

type Switch struct {
	Args           []string `arg:"" optional:"" help:"Branch to switch to and start-point"`
	Create         bool     `name:"create" short:"c" help:"Create a new branch named <branch> starting at <start-point> before switching to the branch"`
	ForceCreate    bool     `` /* 130-byte string literal not displayed */
	Detach         bool     `name:"detach" help:"Switch to a commit for inspection and discardable experiments"`
	Orphan         bool     `name:"orphan" help:"Create a new orphan branch, named <new-branch>. All tracked files are removed"`
	DiscardChanges bool     `name:"discard-changes" help:"Proceed even if the index or the working tree differs from HEAD"`
	Force          bool     `name:"force" short:"f" help:"An alias for --discard-changes"`
	Merge          bool     `name:"merge" short:"m" negatable:"" default:"true" help:"Perform a 3-way merge with the new branch"`
	Remote         bool     `name:"remote" help:"Attempt to checkout from remote when branch is absent"`
	Limit          int64    `` /* 143-byte string literal not displayed */
	Quiet          bool     `name:"quiet" help:"Operate quietly. Progress is not reported to the standard error stream"`
}

func (*Switch) Discard

func (s *Switch) Discard() bool

func (*Switch) Run

func (s *Switch) Run(g *Globals) error

func (*Switch) Summary

func (s *Switch) Summary() string

type Tag

type Tag struct {
	Annotate bool     `name:"annotate" short:"a" help:"Annotated tag, needs a message"`
	File     string   `name:"file" short:"F" help:"Take the tag message from the given file. Use - to read the message from the standard input"`
	Message  []string `name:"message" short:"m" help:"Use the given tag message (instead of prompting)"`
	List     bool     `name:"list" short:"l" help:"List tags. With optional <pattern>..."`
	Delete   bool     `name:"delete" short:"d" help:"Delete tags"`
	Force    bool     `name:"force" short:"f" help:"Replace the tag if exists"`
	Args     []string `arg:"" optional:"" name:"args" help:"Tag args: <tagname>, <pattern>, <start-point>"`
}

func (*Tag) Run

func (t *Tag) Run(g *Globals) error

func (*Tag) Summary

func (t *Tag) Summary() string

type Version

type Version struct {
	BuildOptions bool `name:"build-options" help:"Also print build options"`
	JSON         bool `short:"j" name:"json" help:"Data will be returned in JSON format"`
}

func (*Version) Run

func (c *Version) Run(g *Globals) error

type VersionFlag

type VersionFlag bool

func (VersionFlag) BeforeApply

func (v VersionFlag) BeforeApply(app *kong.Kong, vars kong.Vars) error

func (VersionFlag) Decode

func (v VersionFlag) Decode(ctx *kong.DecodeContext) error

func (VersionFlag) IsBool

func (v VersionFlag) IsBool() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL