git

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

package git contains git related actions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionAliases

func ActionAliases(gitDir string) carapace.Action

ActionAliases completes aliases

po (push origin)
ct (checkout --track)

func ActionAuthors

func ActionAuthors() carapace.Action

ActionAuthors completes authors

Some Name (email@host.com)
Another Name (email@another.com)

func ActionBundleHeads

func ActionBundleHeads(file string) carapace.Action

ActionBundleHeads completes refs in a bundle

func ActionCachedDiffs

func ActionCachedDiffs(ref string) carapace.Action

ActionCachedDiffs completes changes between stage and given ref

func ActionChanges

func ActionChanges(opts ChangeOpts) carapace.Action

ActionChanges completes (un)staged changes

fileA ( M)
pathA/fileB (??)

func ActionCleanupMode

func ActionCleanupMode() carapace.Action

ActionCleanupMode completes cleanup modes

strip (strip empty lines and trailing whitespace)
whitespace (same as strip except #commentary is not removed)

func ActionColorConfigs

func ActionColorConfigs() carapace.Action

ActionColorConfigs completes color configs

func ActionColorModes

func ActionColorModes() carapace.Action

ActionColorModes completes color modes

always
auto

func ActionColorMovedModes

func ActionColorMovedModes() carapace.Action

ActionColorMovedModes completes color moved modes

no (Moved lines are not highlighted)
default (default mode)

func ActionColorMovedWsModes

func ActionColorMovedWsModes() carapace.Action

ActionColorMovedWsModes completed color moved whitespace modes

no (Do not ignore whitespace when performing move detection)
ignore-space-at-eol (Ignore changes in whitespace at EOL)

func ActionColors

func ActionColors() carapace.Action

ActionColors completes colors

func ActionColumnLayoutModes

func ActionColumnLayoutModes() carapace.Action

ActionColumnLayoutModes completions column layout modes

always (always show in columns)
auto (show in columns if the output is to the terminal)

func ActionCommitters

func ActionCommitters() carapace.Action

ActionCommitters completes committers

GitHub
another

func ActionConfigTypeOptions

func ActionConfigTypeOptions(t string) carapace.Action

ActionConfigTypeOptions completes options for a config type

func ActionConfigTypes

func ActionConfigTypes() carapace.Action

ActionConfigTypes completes config types

func ActionConfigValues

func ActionConfigValues(config string) carapace.Action

ActionConfigValues completes config values

func ActionConfigs

func ActionConfigs() carapace.Action

ActionConfigs completes configs

func ActionCurrentBranch

func ActionCurrentBranch() carapace.Action

ActionCurrentBranch completes the current branch

currentBranch

func ActionDeveloperInterfaces

func ActionDeveloperInterfaces() carapace.Action

ActionDeveloperInterfaces completes developer interfaces

format-bundle (The bundle file format)
format-chunk (Chunk-based file formats)

func ActionDiffAlgorithms

func ActionDiffAlgorithms() carapace.Action

ActionDiffAlgorithms completes diff algorithms

myers (The basic greedy diff algorithm)
minimal (Spend extra time to make sure the smallest possible diff is produced)

func ActionDiffFilters

func ActionDiffFilters() carapace.Action

ActionDiffFilters completes diff filters

A (Added)
C (Copied)

func ActionDiffTools

func ActionDiffTools() carapace.Action

ActionDiffTools completes diff tools

meld
nvimdiff

func ActionDirstats

func ActionDirstats() carapace.Action

ActionDirstats completes dirstats

files (Compute the dirstat numbers by counting the number of files changed)
cumulative (Count changes in a child directory for the parent directory as well)

func ActionFieldNames

func ActionFieldNames() carapace.Action

ActionFieldNames completes field names

author (the author header-field)
body (the body of the message)

func ActionHeadCommits

func ActionHeadCommits(limit int) carapace.Action

ActionHeadCommits completes recent head commits

HEAD (commit message)
HEAD~1 (commit message)

func ActionLocalBranches

func ActionLocalBranches() carapace.Action

ActionLocalBranches completes local branches

master (last commit msg)
another (last commit msg)

func ActionLsRemoteRefs

func ActionLsRemoteRefs(opts LsRemoteRefOption) carapace.Action

ActionLsRemoteRefs completes branches and tags for a remote url

gh-pages (da4528d0a57ad71417336f0e96fa65ece2fad45a)
master (3fbdef3c6a10094812a15cba8e825898b757dfb3)

func ActionMaintenanceTasks

func ActionMaintenanceTasks() carapace.Action

ActionMaintenanceTasks completes maintenance tasks

commit-graph (Update the commit-graph files incrementally)
prefetch (Updates the object directory with the latest objects from all registered remotes)

func ActionMergeStrategy

func ActionMergeStrategy() carapace.Action

ActionMergeStrategy completes merge strategies

octopus (resolve cases with more than two heads)
ours (auto-resolve cleanly by favoring our version)

func ActionMergeStrategyOptions

func ActionMergeStrategyOptions(strategy string) carapace.Action

ActionMergeStrategyOptions completes merge strategy options

ours (auto-resolve favoring ours)
theirs (auto-resolve favoring theirs)

func ActionNotes

func ActionNotes() carapace.Action

ActionNotes completes notes

e37823c1 (d10deda4)
fc287455 (53797853)

func ActionNotesMergeStrategies

func ActionNotesMergeStrategies() carapace.Action

ActionNotesMergeStrategies completes notes merge strategies

ours (favor the local version)
theirs (favor the remote version)

func ActionRecentCommits

func ActionRecentCommits(limit int) carapace.Action

ActionRecentCommits completes recent commits

123456A ((refname) commit message)
123456B ((refname) commit message)

func ActionRefChanges

func ActionRefChanges(ref string) carapace.Action

ActionRefChanges completes changes made in given ref

go.mod
cmd/carapace/main.go

func ActionRefCommits

func ActionRefCommits(ref string) carapace.Action

ActionRefCommits completes commits reachable by given ref

00 (commit message)
01 (commit message)

func ActionRefDiffs

func ActionRefDiffs(refs ...string) carapace.Action

ActionRefDiffs completes changes beetween refs Accepts up to two refs 0: compare current workspace to HEAD 1: compare current workspace to given ref 2: compare first ref to second ref

func ActionRefFiles

func ActionRefFiles(ref string) carapace.Action

ActionRefFiles completes files of given ref

go.mod
pkg/

func ActionRefParents

func ActionRefParents(ref string) carapace.Action

ActionRefParents completes parents of given ref

1 (7aca3ebc)
2 (4f4f9e93)

func ActionRefRanges

func ActionRefRanges(opts RefOption) carapace.Action

ActionRefRanges completes refs as range

HEAD..HEAD~17 (last commit msg)
v.0.0.3^2~03...v0.0.4~03 (last commit msg)

func ActionRefs

func ActionRefs(refOption RefOption) carapace.Action

ActionRefs completes refs (commits, branches, tags)

HEAD~1 (last commit msg)
v0.0.1 (last commit msg)

func ActionRemoteBranchNames

func ActionRemoteBranchNames(remote string) carapace.Action

ActionRemoteBranchNames is like ActionRemoteBranches but skips the remote prefix

master (last commit msg)
another (last commit msg)

func ActionRemoteBranches

func ActionRemoteBranches(remote string) carapace.Action

ActionRemoteBranches completes remote branches

origin/master (last commit msg)
upstream/another (last commit msg)

func ActionRemoteUrls

func ActionRemoteUrls(remote string) carapace.Action

ActionRemoteUrls completes remote urls

func ActionRemotes

func ActionRemotes() carapace.Action

ActionRemotes completes remote names

origin
upstream

func ActionRepositorySearch

func ActionRepositorySearch(opts SearchOpts) carapace.Action

ActionRepositorySearch completes repositories from github.com and gitlab.com

https://github.com/spf13/cobra
https://gitlab.com/gitlab-org/gitlab-runner

func ActionStashes

func ActionStashes() carapace.Action

ActionStashes completes stash names

stash@{0} (WIP on branchA: ABCDEF1 last commit msg)
stash@{1} (WIP on branchB: ABCDEF2 last commit msg)

func ActionSubmoduleBranches

func ActionSubmoduleBranches(filter ...string) carapace.Action

ActionSubmoduleBranches completes brances and tags of submodules (filtered by name) TODO verify and add example

func ActionSubmoduleNames

func ActionSubmoduleNames() carapace.Action

ActionSubmoduleNames completes submodule names

cobra (https://github.com/spf13/cobra.git)
pflag (https://github.com/spf13/pflag.git)

func ActionSubmodulePaths

func ActionSubmodulePaths() carapace.Action

ActionSubmodulePaths completes submodules (relative path)

../cli (v1.12.1-12-gaed8966f)
../pflag (heads/forOgier)

func ActionTags

func ActionTags() carapace.Action

ActionTags completes tags

v0.0.1
v0.0.2

func ActionTextAttributes

func ActionTextAttributes() carapace.Action

ActionTextAttributes completes text attributes

func ActionUnmergedFiles

func ActionUnmergedFiles() carapace.Action

ActionUnmergedFiles completes unmerged files

file1.txt
dirA/file2.txt

func ActionVariables

func ActionVariables() carapace.Action

ActionVariables completes variables

GIT_EDITOR (nvim)
GIT_PAGER (bat --style grid)

func ActionWhitespaceModes

func ActionWhitespaceModes() carapace.Action

ActionWhitespaceModes completes whitespace modes

error (outputs warnings for a few such errors, and refuses to apply the patch)
error-all (is similar to error but shows all errors)

func ActionWhitespaceProblems

func ActionWhitespaceProblems() carapace.Action

ActionWhitespaceProblems completes whitespace problems

blank-at-eof (treats blank lines added at the end of file as an error)
trailing-space (is a short-hand to cover both blank-at-eol and blank-at-eof)

func ActionWordDiffModes

func ActionWordDiffModes() carapace.Action

ActionWordDiffModes completes word diff modes

no (Do not ignore whitespace when performing move detection)
ignore-space-at-eol (Ignore changes in whitespace at EOL)

func ActionWorktrees

func ActionWorktrees() carapace.Action

ActionWorktrees completes worktrees

/tmp/carapace-spec.git ((bare))
/tmp/carapace-spec.git/mexample (a3d9c48 [doc-usage])

func ActionWsErrorHighlightModes

func ActionWsErrorHighlightModes() carapace.Action

ActionWsErrorHighlightModes completes whitespace error highlight modes

context (context lines)
old (old lines)

func Aliases

func Aliases(dir, gitDir string) (map[string]string, error)

Types

type ChangeOpts

type ChangeOpts struct {
	Ignored  bool
	Staged   bool
	Unstaged bool
}

func (ChangeOpts) Default

func (o ChangeOpts) Default() ChangeOpts

type LsRemoteRefOption

type LsRemoteRefOption struct {
	Url      string
	Branches bool
	Tags     bool
}

type RefOption

type RefOption struct {
	LocalBranches  bool
	RemoteBranches bool
	HeadCommits    bool
	Tags           bool
	Stashes        bool
	Notes          bool
}

func (RefOption) Default

func (o RefOption) Default() RefOption

type SearchOpts

type SearchOpts struct {
	Prefix bool
	Github bool
	Gitlab bool
}

func (SearchOpts) Default

func (o SearchOpts) Default() SearchOpts

func (SearchOpts) Hosts

func (o SearchOpts) Hosts() []string

Jump to

Keyboard shortcuts

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