Documentation ¶
Index ¶
- Constants
- func FuzzySearchFunc(options []string) func(string) []*types.Suggestion
- func GetWindowDimensions(args WindowArrangementArgs) map[string]boxlayout.Dimensions
- func MergeMaps[K comparable, V any](maps ...map[K]V) map[K]V
- func SanitizedBranchName(input string) string
- func TryRemoveHardLineBreaks(message string, autoWrapWidth int) string
- type AmendHelper
- type AppStatusHelper
- func (self *AppStatusHelper) GetStatusString() string
- func (self *AppStatusHelper) HasStatus() bool
- func (self *AppStatusHelper) Toast(message string, kind types.ToastKind)
- func (self *AppStatusHelper) WithWaitingStatus(message string, f func(gocui.Task) error)
- func (self *AppStatusHelper) WithWaitingStatusSync(message string, f func() error)
- type BisectHelper
- type BranchesHelper
- type CherryPickHelper
- type CommitsHelper
- func (self *CommitsHelper) CloseCommitMessagePanel() error
- func (self *CommitsHelper) HandleCommitConfirm() error
- func (self *CommitsHelper) JoinCommitMessageAndUnwrappedDescription() string
- func (self *CommitsHelper) OnCommitSuccess()
- func (self *CommitsHelper) OpenCommitMenu(suggestionFunc func(string) []*types.Suggestion) error
- func (self *CommitsHelper) OpenCommitMessagePanel(opts *OpenCommitMessagePanelOpts) error
- func (self *CommitsHelper) PopCommitMessageContexts() error
- func (self *CommitsHelper) SetMessageAndDescriptionInView(message string)
- func (self *CommitsHelper) SplitCommitMessageAndDescription(message string) (string, string)
- func (self *CommitsHelper) SwitchToEditor() error
- func (self *CommitsHelper) UpdateCommitPanelView(message string)
- type ConfirmationHelper
- func (self *ConfirmationHelper) CreatePopupPanel(ctx goContext.Context, opts types.CreatePopupPanelOpts) error
- func (self *ConfirmationHelper) DeactivateConfirmationPrompt()
- func (self *ConfirmationHelper) IsPopupPanel(viewName string) bool
- func (self *ConfirmationHelper) IsPopupPanelFocused() bool
- func (self *ConfirmationHelper) ResizeCommitMessagePanels()
- func (self *ConfirmationHelper) ResizeConfirmationPanel()
- func (self *ConfirmationHelper) ResizeCurrentPopupPanel() error
- func (self *ConfirmationHelper) ResizePopupPanel(v *gocui.View, content string) error
- func (self *ConfirmationHelper) TooltipForMenuItem(menuItem *types.MenuItem) string
- type CredentialsHelper
- type DiffHelper
- func (self *DiffHelper) CurrentDiffTerminals() []string
- func (self *DiffHelper) DiffArgs() []string
- func (self *DiffHelper) ExitDiffMode() error
- func (self *DiffHelper) IgnoringWhitespaceSubTitle() string
- func (self *DiffHelper) RenderDiff() error
- func (self *DiffHelper) WithDiffModeCheck(f func() error) error
- type FilesHelper
- func (self *FilesHelper) EditFile(filename string) error
- func (self *FilesHelper) EditFileAtLine(filename string, lineNumber int) error
- func (self *FilesHelper) EditFileAtLineAndWait(filename string, lineNumber int) error
- func (self *FilesHelper) OpenDirInEditor(path string) error
- func (self *FilesHelper) OpenFile(filename string) error
- type FixupHelper
- type GpgHelper
- type HelperCommon
- type Helpers
- type HostHelper
- type ICommitsHelper
- type IFilesHelper
- type IGetContexts
- type IHostHelper
- type IPatchBuildingHelper
- type IRefsHelper
- type ISuggestionsHelper
- type IUpstreamHelper
- type IWorkingTreeHelper
- type IWorktreeHelper
- type InlineStatusHelper
- type InlineStatusOpts
- type MergeAndRebaseHelper
- func (self *MergeAndRebaseHelper) AbortMergeOrRebaseWithConfirm() error
- func (self *MergeAndRebaseHelper) CheckForConflicts(result error) error
- func (self *MergeAndRebaseHelper) CheckMergeOrRebase(result error) error
- func (self *MergeAndRebaseHelper) CheckMergeOrRebaseWithRefreshOptions(result error, refreshOptions types.RefreshOptions) error
- func (self *MergeAndRebaseHelper) CreateRebaseOptionsMenu() error
- func (self *MergeAndRebaseHelper) MergeRefIntoCheckedOutBranch(refName string) error
- func (self *MergeAndRebaseHelper) PromptForConflictHandling() error
- func (self *MergeAndRebaseHelper) PromptToContinueRebase() error
- func (self *MergeAndRebaseHelper) RebaseOntoRef(ref string) error
- func (self *MergeAndRebaseHelper) ResetMarkedBaseCommit() error
- type MergeConflictsHelper
- func (self *MergeConflictsHelper) EscapeMerge() error
- func (self *MergeConflictsHelper) RefreshMergeState() error
- func (self *MergeConflictsHelper) Render() error
- func (self *MergeConflictsHelper) ResetMergeState()
- func (self *MergeConflictsHelper) SetConflictsAndRender(path string) (bool, error)
- func (self *MergeConflictsHelper) SetMergeState(path string) (bool, error)
- func (self *MergeConflictsHelper) SwitchToMerge(path string) error
- type ModeHelper
- func (self *ModeHelper) ClearFiltering() error
- func (self *ModeHelper) ExitFilterMode() error
- func (self *ModeHelper) GetActiveMode() (ModeStatus, bool)
- func (self *ModeHelper) IsAnyModeActive() bool
- func (self *ModeHelper) SetSuppressRebasingMode(value bool)
- func (self *ModeHelper) Statuses() []ModeStatus
- type ModeStatus
- type OpenCommitMessagePanelOpts
- type PatchBuildingHelper
- type RebaseOption
- type RecordDirectoryHelper
- type RefreshHelper
- type RefsHelper
- func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions) error
- func (self *RefsHelper) CreateGitResetMenu(ref string) error
- func (self *RefsHelper) CreateSortOrderMenu(sortOptionsOrder []string, onSelected func(sortOrder string) error) error
- func (self *RefsHelper) GetCheckedOutRef() *models.Branch
- func (self *RefsHelper) NewBranch(from string, fromFormattedName string, suggestedBranchName string) error
- func (self *RefsHelper) ResetToRef(ref string, strength string, envVars []string) error
- type ReposHelper
- func (self *ReposHelper) CreateRecentReposMenu() error
- func (self *ReposHelper) DispatchSwitchTo(path string, errMsg string, contextKey types.ContextKey) error
- func (self *ReposHelper) DispatchSwitchToRepo(path string, contextKey types.ContextKey) error
- func (self *ReposHelper) EnterSubmodule(submodule *models.SubmoduleConfig) error
- type SearchHelper
- func (self *SearchHelper) Cancel()
- func (self *SearchHelper) CancelPrompt() error
- func (self *SearchHelper) CancelSearchIfSearching(c types.Context)
- func (self *SearchHelper) Confirm() error
- func (self *SearchHelper) ConfirmFilter() error
- func (self *SearchHelper) ConfirmSearch() error
- func (self *SearchHelper) DisplayFilterStatus(context types.IFilterableContext)
- func (self *SearchHelper) DisplaySearchStatus(context types.ISearchableContext)
- func (self *SearchHelper) HidePrompt()
- func (self *SearchHelper) OnPromptContentChanged(searchString string)
- func (self *SearchHelper) OpenFilterPrompt(context types.IFilterableContext) error
- func (self *SearchHelper) OpenSearchPrompt(context types.ISearchableContext) error
- func (self *SearchHelper) ReApplyFilter(context types.Context)
- func (self *SearchHelper) RenderSearchStatus(c types.Context)
- func (self *SearchHelper) ScrollHistory(scrollIncrement int)
- type SnakeHelper
- type StagingHelper
- type SubCommitsHelper
- type SuggestionsHelper
- func (self *SuggestionsHelper) GetAuthorsSuggestionsFunc() func(string) []*types.Suggestion
- func (self *SuggestionsHelper) GetBranchNameSuggestionsFunc() func(string) []*types.Suggestion
- func (self *SuggestionsHelper) GetFilePathSuggestionsFunc() func(string) []*types.Suggestion
- func (self *SuggestionsHelper) GetRefsSuggestionsFunc() func(string) []*types.Suggestion
- func (self *SuggestionsHelper) GetRemoteBranchesSuggestionsFunc(separator string) func(string) []*types.Suggestion
- func (self *SuggestionsHelper) GetRemoteSuggestionsFunc() func(string) []*types.Suggestion
- func (self *SuggestionsHelper) GetTagsSuggestionsFunc() func(string) []*types.Suggestion
- type TagsHelper
- type UpdateHelper
- type UpstreamHelper
- func (self *UpstreamHelper) GetSuggestedRemote() string
- func (self *UpstreamHelper) ParseUpstream(upstream string) (string, string, error)
- func (self *UpstreamHelper) PromptForUpstreamWithInitialContent(currentBranch *models.Branch, onConfirm func(string) error) error
- func (self *UpstreamHelper) PromptForUpstreamWithoutInitialContent(_ *models.Branch, onConfirm func(string) error) error
- type ViewHelper
- type ViewSubCommitsOpts
- type WindowArrangementArgs
- type WindowArrangementHelper
- type WindowHelper
- func (self *WindowHelper) CurrentWindow() string
- func (self *WindowHelper) GetContextForWindow(window string) types.Context
- func (self *WindowHelper) GetViewNameForWindow(window string) string
- func (self *WindowHelper) MoveToTopOfWindow(context types.Context)
- func (self *WindowHelper) SetWindowContext(c types.Context)
- func (self *WindowHelper) SideWindows() []string
- func (self *WindowHelper) TopViewInWindow(windowName string, includeInvisibleViews bool) *gocui.View
- func (self *WindowHelper) WindowForView(viewName string) string
- type WorkingTreeHelper
- func (self *WorkingTreeHelper) AnyStagedFiles() bool
- func (self *WorkingTreeHelper) AnyTrackedFiles() bool
- func (self *WorkingTreeHelper) FileForSubmodule(submodule *models.SubmoduleConfig) *models.File
- func (self *WorkingTreeHelper) HandleCommitEditorPress() error
- func (self *WorkingTreeHelper) HandleCommitPress() error
- func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage string) error
- func (self *WorkingTreeHelper) HandleWIPCommitPress() error
- func (self *WorkingTreeHelper) IsWorkingTreeDirty() bool
- func (self *WorkingTreeHelper) OpenMergeTool() error
- func (self *WorkingTreeHelper) WithEnsureCommitableFiles(handler func() error) error
- type WorktreeHelper
- func (self *WorktreeHelper) Detach(worktree *models.Worktree) error
- func (self *WorktreeHelper) GetLinkedWorktreeName() string
- func (self *WorktreeHelper) GetMainWorktreeName() string
- func (self *WorktreeHelper) NewWorktree() error
- func (self *WorktreeHelper) NewWorktreeCheckout(base string, canCheckoutBase bool, detached bool, contextKey types.ContextKey) error
- func (self *WorktreeHelper) Remove(worktree *models.Worktree, force bool) error
- func (self *WorktreeHelper) Switch(worktree *models.Worktree, contextKey types.ContextKey) error
- func (self *WorktreeHelper) ViewBranchWorktreeOptions(branchName string, canCheckoutBase bool) error
- func (self *WorktreeHelper) ViewWorktreeOptions(context types.IListContext, ref string) error
Constants ¶
const ( REBASE_OPTION_CONTINUE string = "continue" REBASE_OPTION_ABORT string = "abort" REBASE_OPTION_SKIP string = "skip" )
Variables ¶
This section is empty.
Functions ¶
func FuzzySearchFunc ¶
func FuzzySearchFunc(options []string) func(string) []*types.Suggestion
func GetWindowDimensions ¶
func GetWindowDimensions(args WindowArrangementArgs) map[string]boxlayout.Dimensions
func MergeMaps ¶
func MergeMaps[K comparable, V any](maps ...map[K]V) map[K]V
func SanitizedBranchName ¶
SanitizedBranchName will remove all spaces in favor of a dash "-" to meet git's branch naming requirement.
func TryRemoveHardLineBreaks ¶
Types ¶
type AmendHelper ¶
type AmendHelper struct {
// contains filtered or unexported fields
}
func NewAmendHelper ¶
func NewAmendHelper( c *HelperCommon, gpg *GpgHelper, ) *AmendHelper
func (*AmendHelper) AmendHead ¶
func (self *AmendHelper) AmendHead() error
type AppStatusHelper ¶
type AppStatusHelper struct {
// contains filtered or unexported fields
}
func NewAppStatusHelper ¶
func NewAppStatusHelper(c *HelperCommon, statusMgr func() *status.StatusManager, modeHelper *ModeHelper) *AppStatusHelper
func (*AppStatusHelper) GetStatusString ¶
func (self *AppStatusHelper) GetStatusString() string
func (*AppStatusHelper) HasStatus ¶
func (self *AppStatusHelper) HasStatus() bool
func (*AppStatusHelper) Toast ¶
func (self *AppStatusHelper) Toast(message string, kind types.ToastKind)
func (*AppStatusHelper) WithWaitingStatus ¶
func (self *AppStatusHelper) WithWaitingStatus(message string, f func(gocui.Task) error)
withWaitingStatus wraps a function and shows a waiting status while the function is still executing
func (*AppStatusHelper) WithWaitingStatusSync ¶
func (self *AppStatusHelper) WithWaitingStatusSync(message string, f func() error)
type BisectHelper ¶
type BisectHelper struct {
// contains filtered or unexported fields
}
func NewBisectHelper ¶
func NewBisectHelper(c *HelperCommon) *BisectHelper
func (*BisectHelper) PostBisectCommandRefresh ¶
func (self *BisectHelper) PostBisectCommandRefresh() error
func (*BisectHelper) Reset ¶
func (self *BisectHelper) Reset() error
type BranchesHelper ¶
type BranchesHelper struct {
// contains filtered or unexported fields
}
func NewBranchesHelper ¶
func NewBranchesHelper(c *HelperCommon) *BranchesHelper
func (*BranchesHelper) ConfirmDeleteRemote ¶
func (self *BranchesHelper) ConfirmDeleteRemote(remoteName string, branchName string) error
type CherryPickHelper ¶
type CherryPickHelper struct {
// contains filtered or unexported fields
}
func NewCherryPickHelper ¶
func NewCherryPickHelper( c *HelperCommon, rebaseHelper *MergeAndRebaseHelper, ) *CherryPickHelper
func (*CherryPickHelper) CanPaste ¶
func (self *CherryPickHelper) CanPaste() bool
func (*CherryPickHelper) CopyRange ¶
func (self *CherryPickHelper) CopyRange(commitsList []*models.Commit, context types.IListContext) error
func (*CherryPickHelper) Paste ¶
func (self *CherryPickHelper) Paste() error
HandlePasteCommits begins a cherry-pick rebase with the commits the user has copied. Only to be called from the branch commits controller
func (*CherryPickHelper) Reset ¶
func (self *CherryPickHelper) Reset() error
type CommitsHelper ¶
type CommitsHelper struct {
// contains filtered or unexported fields
}
func NewCommitsHelper ¶
func NewCommitsHelper( c *HelperCommon, getCommitSummary func() string, setCommitSummary func(string), getCommitDescription func() string, getUnwrappedCommitDescription func() string, setCommitDescription func(string), ) *CommitsHelper
func (*CommitsHelper) CloseCommitMessagePanel ¶
func (self *CommitsHelper) CloseCommitMessagePanel() error
func (*CommitsHelper) HandleCommitConfirm ¶
func (self *CommitsHelper) HandleCommitConfirm() error
func (*CommitsHelper) JoinCommitMessageAndUnwrappedDescription ¶
func (self *CommitsHelper) JoinCommitMessageAndUnwrappedDescription() string
func (*CommitsHelper) OnCommitSuccess ¶
func (self *CommitsHelper) OnCommitSuccess()
func (*CommitsHelper) OpenCommitMenu ¶
func (self *CommitsHelper) OpenCommitMenu(suggestionFunc func(string) []*types.Suggestion) error
func (*CommitsHelper) OpenCommitMessagePanel ¶
func (self *CommitsHelper) OpenCommitMessagePanel(opts *OpenCommitMessagePanelOpts) error
func (*CommitsHelper) PopCommitMessageContexts ¶
func (self *CommitsHelper) PopCommitMessageContexts() error
func (*CommitsHelper) SetMessageAndDescriptionInView ¶
func (self *CommitsHelper) SetMessageAndDescriptionInView(message string)
func (*CommitsHelper) SplitCommitMessageAndDescription ¶
func (self *CommitsHelper) SplitCommitMessageAndDescription(message string) (string, string)
func (*CommitsHelper) SwitchToEditor ¶
func (self *CommitsHelper) SwitchToEditor() error
func (*CommitsHelper) UpdateCommitPanelView ¶
func (self *CommitsHelper) UpdateCommitPanelView(message string)
type ConfirmationHelper ¶
type ConfirmationHelper struct {
// contains filtered or unexported fields
}
func NewConfirmationHelper ¶
func NewConfirmationHelper(c *HelperCommon) *ConfirmationHelper
func (*ConfirmationHelper) CreatePopupPanel ¶
func (self *ConfirmationHelper) CreatePopupPanel(ctx goContext.Context, opts types.CreatePopupPanelOpts) error
func (*ConfirmationHelper) DeactivateConfirmationPrompt ¶
func (self *ConfirmationHelper) DeactivateConfirmationPrompt()
func (*ConfirmationHelper) IsPopupPanel ¶
func (self *ConfirmationHelper) IsPopupPanel(viewName string) bool
func (*ConfirmationHelper) IsPopupPanelFocused ¶
func (self *ConfirmationHelper) IsPopupPanelFocused() bool
func (*ConfirmationHelper) ResizeCommitMessagePanels ¶
func (self *ConfirmationHelper) ResizeCommitMessagePanels()
func (*ConfirmationHelper) ResizeConfirmationPanel ¶
func (self *ConfirmationHelper) ResizeConfirmationPanel()
func (*ConfirmationHelper) ResizeCurrentPopupPanel ¶
func (self *ConfirmationHelper) ResizeCurrentPopupPanel() error
func (*ConfirmationHelper) ResizePopupPanel ¶
func (self *ConfirmationHelper) ResizePopupPanel(v *gocui.View, content string) error
func (*ConfirmationHelper) TooltipForMenuItem ¶
func (self *ConfirmationHelper) TooltipForMenuItem(menuItem *types.MenuItem) string
type CredentialsHelper ¶
type CredentialsHelper struct {
// contains filtered or unexported fields
}
func NewCredentialsHelper ¶
func NewCredentialsHelper( c *HelperCommon, ) *CredentialsHelper
func (*CredentialsHelper) PromptUserForCredential ¶
func (self *CredentialsHelper) PromptUserForCredential(passOrUname oscommands.CredentialType) <-chan string
promptUserForCredential wait for a username, password or passphrase input from the credentials popup We return a channel rather than returning the string directly so that the calling function knows when the prompt has been created (before the user has entered anything) so that it can note that we're now waiting on user input and lazygit isn't processing anything.
type DiffHelper ¶
type DiffHelper struct {
// contains filtered or unexported fields
}
func NewDiffHelper ¶
func NewDiffHelper(c *HelperCommon) *DiffHelper
func (*DiffHelper) CurrentDiffTerminals ¶
func (self *DiffHelper) CurrentDiffTerminals() []string
CurrentDiffTerminals returns the current diff terminals of the currently selected item. in the case of a branch it returns both the branch and it's upstream name, which becomes an option when you bring up the diff menu, but when you're just flicking through branches it will be using the local branch name.
func (*DiffHelper) DiffArgs ¶
func (self *DiffHelper) DiffArgs() []string
func (*DiffHelper) ExitDiffMode ¶
func (self *DiffHelper) ExitDiffMode() error
func (*DiffHelper) IgnoringWhitespaceSubTitle ¶
func (self *DiffHelper) IgnoringWhitespaceSubTitle() string
func (*DiffHelper) RenderDiff ¶
func (self *DiffHelper) RenderDiff() error
func (*DiffHelper) WithDiffModeCheck ¶
func (self *DiffHelper) WithDiffModeCheck(f func() error) error
type FilesHelper ¶
type FilesHelper struct {
// contains filtered or unexported fields
}
func NewFilesHelper ¶
func NewFilesHelper(c *HelperCommon) *FilesHelper
func (*FilesHelper) EditFile ¶
func (self *FilesHelper) EditFile(filename string) error
func (*FilesHelper) EditFileAtLine ¶
func (self *FilesHelper) EditFileAtLine(filename string, lineNumber int) error
func (*FilesHelper) EditFileAtLineAndWait ¶
func (self *FilesHelper) EditFileAtLineAndWait(filename string, lineNumber int) error
func (*FilesHelper) OpenDirInEditor ¶
func (self *FilesHelper) OpenDirInEditor(path string) error
func (*FilesHelper) OpenFile ¶
func (self *FilesHelper) OpenFile(filename string) error
type FixupHelper ¶
type FixupHelper struct {
// contains filtered or unexported fields
}
func NewFixupHelper ¶
func NewFixupHelper( c *HelperCommon, ) *FixupHelper
func (*FixupHelper) HandleFindBaseCommitForFixupPress ¶
func (self *FixupHelper) HandleFindBaseCommitForFixupPress() error
type GpgHelper ¶
type GpgHelper struct {
// contains filtered or unexported fields
}
func NewGpgHelper ¶
func NewGpgHelper(c *HelperCommon) *GpgHelper
func (*GpgHelper) WithGpgHandling ¶
func (self *GpgHelper) WithGpgHandling(cmdObj oscommands.ICmdObj, waitingStatus string, onSuccess func() error) error
Currently there is a bug where if we switch to a subprocess from within WithWaitingStatus we get stuck there and can't return to lazygit. We could fix this bug, or just stop running subprocesses from within there, given that we don't need to see a loading status if we're in a subprocess.
type HelperCommon ¶
type HelperCommon struct { *common.Common types.IGuiCommon IGetContexts }
type Helpers ¶
type Helpers struct { Refs *RefsHelper Bisect *BisectHelper Suggestions *SuggestionsHelper Files *FilesHelper WorkingTree *WorkingTreeHelper BranchesHelper *BranchesHelper Tags *TagsHelper MergeAndRebase *MergeAndRebaseHelper MergeConflicts *MergeConflictsHelper CherryPick *CherryPickHelper Host *HostHelper PatchBuilding *PatchBuildingHelper Staging *StagingHelper GPG *GpgHelper Upstream *UpstreamHelper AmendHelper *AmendHelper FixupHelper *FixupHelper Commits *CommitsHelper Snake *SnakeHelper // lives in context package because our contexts need it to render to main Diff *DiffHelper Repos *ReposHelper RecordDirectory *RecordDirectoryHelper Update *UpdateHelper Window *WindowHelper View *ViewHelper Refresh *RefreshHelper Confirmation *ConfirmationHelper Mode *ModeHelper AppStatus *AppStatusHelper InlineStatus *InlineStatusHelper WindowArrangement *WindowArrangementHelper Search *SearchHelper Worktree *WorktreeHelper SubCommits *SubCommitsHelper }
func NewStubHelpers ¶
func NewStubHelpers() *Helpers
type HostHelper ¶
type HostHelper struct {
// contains filtered or unexported fields
}
func NewHostHelper ¶
func NewHostHelper( c *HelperCommon, ) *HostHelper
func (*HostHelper) GetCommitURL ¶
func (self *HostHelper) GetCommitURL(commitSha string) (string, error)
func (*HostHelper) GetPullRequestURL ¶
func (self *HostHelper) GetPullRequestURL(from string, to string) (string, error)
type ICommitsHelper ¶
type ICommitsHelper interface {
UpdateCommitPanelView(message string)
}
type IFilesHelper ¶
type IGetContexts ¶
type IGetContexts interface {
Contexts() *context.ContextTree
}
type IHostHelper ¶
type IPatchBuildingHelper ¶
type IRefsHelper ¶
type IRefsHelper interface { CheckoutRef(ref string, options types.CheckoutRefOptions) error GetCheckedOutRef() *models.Branch CreateGitResetMenu(ref string) error ResetToRef(ref string, strength string, envVars []string) error NewBranch(from string, fromDescription string, suggestedBranchname string) error }
type ISuggestionsHelper ¶
type ISuggestionsHelper interface { GetRemoteSuggestionsFunc() func(string) []*types.Suggestion GetBranchNameSuggestionsFunc() func(string) []*types.Suggestion GetFilePathSuggestionsFunc() func(string) []*types.Suggestion GetRemoteBranchesSuggestionsFunc(separator string) func(string) []*types.Suggestion GetRefsSuggestionsFunc() func(string) []*types.Suggestion }
type IUpstreamHelper ¶
type IWorkingTreeHelper ¶
type IWorktreeHelper ¶
type InlineStatusHelper ¶
type InlineStatusHelper struct {
// contains filtered or unexported fields
}
func NewInlineStatusHelper ¶
func NewInlineStatusHelper(c *HelperCommon, windowHelper *WindowHelper) *InlineStatusHelper
func (*InlineStatusHelper) WithInlineStatus ¶
func (self *InlineStatusHelper) WithInlineStatus(opts InlineStatusOpts, f func(gocui.Task) error)
type InlineStatusOpts ¶
type InlineStatusOpts struct { Item types.HasUrn Operation types.ItemOperation ContextKey types.ContextKey }
type MergeAndRebaseHelper ¶
type MergeAndRebaseHelper struct {
// contains filtered or unexported fields
}
func NewMergeAndRebaseHelper ¶
func NewMergeAndRebaseHelper( c *HelperCommon, refsHelper *RefsHelper, ) *MergeAndRebaseHelper
func (*MergeAndRebaseHelper) AbortMergeOrRebaseWithConfirm ¶
func (self *MergeAndRebaseHelper) AbortMergeOrRebaseWithConfirm() error
func (*MergeAndRebaseHelper) CheckForConflicts ¶
func (self *MergeAndRebaseHelper) CheckForConflicts(result error) error
func (*MergeAndRebaseHelper) CheckMergeOrRebase ¶
func (self *MergeAndRebaseHelper) CheckMergeOrRebase(result error) error
func (*MergeAndRebaseHelper) CheckMergeOrRebaseWithRefreshOptions ¶
func (self *MergeAndRebaseHelper) CheckMergeOrRebaseWithRefreshOptions(result error, refreshOptions types.RefreshOptions) error
func (*MergeAndRebaseHelper) CreateRebaseOptionsMenu ¶
func (self *MergeAndRebaseHelper) CreateRebaseOptionsMenu() error
func (*MergeAndRebaseHelper) MergeRefIntoCheckedOutBranch ¶
func (self *MergeAndRebaseHelper) MergeRefIntoCheckedOutBranch(refName string) error
func (*MergeAndRebaseHelper) PromptForConflictHandling ¶
func (self *MergeAndRebaseHelper) PromptForConflictHandling() error
func (*MergeAndRebaseHelper) PromptToContinueRebase ¶
func (self *MergeAndRebaseHelper) PromptToContinueRebase() error
PromptToContinueRebase asks the user if they want to continue the rebase/merge that's in progress
func (*MergeAndRebaseHelper) RebaseOntoRef ¶
func (self *MergeAndRebaseHelper) RebaseOntoRef(ref string) error
func (*MergeAndRebaseHelper) ResetMarkedBaseCommit ¶
func (self *MergeAndRebaseHelper) ResetMarkedBaseCommit() error
type MergeConflictsHelper ¶
type MergeConflictsHelper struct {
// contains filtered or unexported fields
}
func NewMergeConflictsHelper ¶
func NewMergeConflictsHelper( c *HelperCommon, ) *MergeConflictsHelper
func (*MergeConflictsHelper) EscapeMerge ¶
func (self *MergeConflictsHelper) EscapeMerge() error
func (*MergeConflictsHelper) RefreshMergeState ¶
func (self *MergeConflictsHelper) RefreshMergeState() error
func (*MergeConflictsHelper) Render ¶
func (self *MergeConflictsHelper) Render() error
func (*MergeConflictsHelper) ResetMergeState ¶
func (self *MergeConflictsHelper) ResetMergeState()
func (*MergeConflictsHelper) SetConflictsAndRender ¶
func (self *MergeConflictsHelper) SetConflictsAndRender(path string) (bool, error)
func (*MergeConflictsHelper) SetMergeState ¶
func (self *MergeConflictsHelper) SetMergeState(path string) (bool, error)
func (*MergeConflictsHelper) SwitchToMerge ¶
func (self *MergeConflictsHelper) SwitchToMerge(path string) error
type ModeHelper ¶
type ModeHelper struct {
// contains filtered or unexported fields
}
func NewModeHelper ¶
func NewModeHelper( c *HelperCommon, diffHelper *DiffHelper, patchBuildingHelper *PatchBuildingHelper, cherryPickHelper *CherryPickHelper, mergeAndRebaseHelper *MergeAndRebaseHelper, bisectHelper *BisectHelper, ) *ModeHelper
func (*ModeHelper) ClearFiltering ¶
func (self *ModeHelper) ClearFiltering() error
func (*ModeHelper) ExitFilterMode ¶
func (self *ModeHelper) ExitFilterMode() error
func (*ModeHelper) GetActiveMode ¶
func (self *ModeHelper) GetActiveMode() (ModeStatus, bool)
func (*ModeHelper) IsAnyModeActive ¶
func (self *ModeHelper) IsAnyModeActive() bool
func (*ModeHelper) SetSuppressRebasingMode ¶
func (self *ModeHelper) SetSuppressRebasingMode(value bool)
func (*ModeHelper) Statuses ¶
func (self *ModeHelper) Statuses() []ModeStatus
type ModeStatus ¶
type PatchBuildingHelper ¶
type PatchBuildingHelper struct {
// contains filtered or unexported fields
}
func NewPatchBuildingHelper ¶
func NewPatchBuildingHelper( c *HelperCommon, ) *PatchBuildingHelper
func (*PatchBuildingHelper) Escape ¶
func (self *PatchBuildingHelper) Escape() error
takes us from the patch building panel back to the commit files panel
func (*PatchBuildingHelper) RefreshPatchBuildingPanel ¶
func (self *PatchBuildingHelper) RefreshPatchBuildingPanel(opts types.OnFocusOpts) error
func (*PatchBuildingHelper) Reset ¶
func (self *PatchBuildingHelper) Reset() error
kills the custom patch and returns us back to the commit files panel if needed
func (*PatchBuildingHelper) ValidateNormalWorkingTreeState ¶
func (self *PatchBuildingHelper) ValidateNormalWorkingTreeState() (bool, error)
type RebaseOption ¶
type RebaseOption string
type RecordDirectoryHelper ¶
type RecordDirectoryHelper struct {
// contains filtered or unexported fields
}
func NewRecordDirectoryHelper ¶
func NewRecordDirectoryHelper(c *HelperCommon) *RecordDirectoryHelper
func (*RecordDirectoryHelper) RecordCurrentDirectory ¶
func (self *RecordDirectoryHelper) RecordCurrentDirectory() error
when a user runs lazygit with the LAZYGIT_NEW_DIR_FILE env variable defined we will write the current directory to that file on exit so that their shell can then change to that directory. That means you don't get kicked back to the directory that you started with.
func (*RecordDirectoryHelper) RecordDirectory ¶
func (self *RecordDirectoryHelper) RecordDirectory(dirName string) error
type RefreshHelper ¶
type RefreshHelper struct {
// contains filtered or unexported fields
}
func NewRefreshHelper ¶
func NewRefreshHelper( c *HelperCommon, refsHelper *RefsHelper, mergeAndRebaseHelper *MergeAndRebaseHelper, patchBuildingHelper *PatchBuildingHelper, stagingHelper *StagingHelper, mergeConflictsHelper *MergeConflictsHelper, worktreeHelper *WorktreeHelper, searchHelper *SearchHelper, ) *RefreshHelper
func (*RefreshHelper) Refresh ¶
func (self *RefreshHelper) Refresh(options types.RefreshOptions) error
func (*RefreshHelper) RefreshAuthors ¶
func (self *RefreshHelper) RefreshAuthors(commits []*models.Commit)
type RefsHelper ¶
type RefsHelper struct {
// contains filtered or unexported fields
}
func NewRefsHelper ¶
func NewRefsHelper( c *HelperCommon, ) *RefsHelper
func (*RefsHelper) CheckoutRef ¶
func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions) error
func (*RefsHelper) CreateGitResetMenu ¶
func (self *RefsHelper) CreateGitResetMenu(ref string) error
func (*RefsHelper) CreateSortOrderMenu ¶
func (self *RefsHelper) CreateSortOrderMenu(sortOptionsOrder []string, onSelected func(sortOrder string) error) error
func (*RefsHelper) GetCheckedOutRef ¶
func (self *RefsHelper) GetCheckedOutRef() *models.Branch
func (*RefsHelper) NewBranch ¶
func (self *RefsHelper) NewBranch(from string, fromFormattedName string, suggestedBranchName string) error
func (*RefsHelper) ResetToRef ¶
func (self *RefsHelper) ResetToRef(ref string, strength string, envVars []string) error
type ReposHelper ¶
type ReposHelper struct {
// contains filtered or unexported fields
}
helps switch back and forth between repos
func NewRecentReposHelper ¶
func NewRecentReposHelper( c *HelperCommon, recordDirectoryHelper *RecordDirectoryHelper, onNewRepo onNewRepoFn, ) *ReposHelper
func (*ReposHelper) CreateRecentReposMenu ¶
func (self *ReposHelper) CreateRecentReposMenu() error
func (*ReposHelper) DispatchSwitchTo ¶
func (self *ReposHelper) DispatchSwitchTo(path string, errMsg string, contextKey types.ContextKey) error
func (*ReposHelper) DispatchSwitchToRepo ¶
func (self *ReposHelper) DispatchSwitchToRepo(path string, contextKey types.ContextKey) error
func (*ReposHelper) EnterSubmodule ¶
func (self *ReposHelper) EnterSubmodule(submodule *models.SubmoduleConfig) error
type SearchHelper ¶
type SearchHelper struct {
// contains filtered or unexported fields
}
func NewSearchHelper ¶
func NewSearchHelper( c *HelperCommon, ) *SearchHelper
func (*SearchHelper) Cancel ¶
func (self *SearchHelper) Cancel()
func (*SearchHelper) CancelPrompt ¶
func (self *SearchHelper) CancelPrompt() error
func (*SearchHelper) CancelSearchIfSearching ¶
func (self *SearchHelper) CancelSearchIfSearching(c types.Context)
func (*SearchHelper) Confirm ¶
func (self *SearchHelper) Confirm() error
func (*SearchHelper) ConfirmFilter ¶
func (self *SearchHelper) ConfirmFilter() error
func (*SearchHelper) ConfirmSearch ¶
func (self *SearchHelper) ConfirmSearch() error
func (*SearchHelper) DisplayFilterStatus ¶
func (self *SearchHelper) DisplayFilterStatus(context types.IFilterableContext)
func (*SearchHelper) DisplaySearchStatus ¶
func (self *SearchHelper) DisplaySearchStatus(context types.ISearchableContext)
func (*SearchHelper) HidePrompt ¶
func (self *SearchHelper) HidePrompt()
func (*SearchHelper) OnPromptContentChanged ¶
func (self *SearchHelper) OnPromptContentChanged(searchString string)
func (*SearchHelper) OpenFilterPrompt ¶
func (self *SearchHelper) OpenFilterPrompt(context types.IFilterableContext) error
func (*SearchHelper) OpenSearchPrompt ¶
func (self *SearchHelper) OpenSearchPrompt(context types.ISearchableContext) error
func (*SearchHelper) ReApplyFilter ¶
func (self *SearchHelper) ReApplyFilter(context types.Context)
func (*SearchHelper) RenderSearchStatus ¶
func (self *SearchHelper) RenderSearchStatus(c types.Context)
func (*SearchHelper) ScrollHistory ¶
func (self *SearchHelper) ScrollHistory(scrollIncrement int)
type SnakeHelper ¶
type SnakeHelper struct {
// contains filtered or unexported fields
}
func NewSnakeHelper ¶
func NewSnakeHelper(c *HelperCommon) *SnakeHelper
func (*SnakeHelper) ExitGame ¶
func (self *SnakeHelper) ExitGame()
func (*SnakeHelper) SetDirection ¶
func (self *SnakeHelper) SetDirection(direction snake.Direction)
func (*SnakeHelper) StartGame ¶
func (self *SnakeHelper) StartGame()
type StagingHelper ¶
type StagingHelper struct {
// contains filtered or unexported fields
}
func NewStagingHelper ¶
func NewStagingHelper( c *HelperCommon, ) *StagingHelper
func (*StagingHelper) RefreshStagingPanel ¶
func (self *StagingHelper) RefreshStagingPanel(focusOpts types.OnFocusOpts) error
NOTE: used from outside this file
type SubCommitsHelper ¶
type SubCommitsHelper struct {
// contains filtered or unexported fields
}
func NewSubCommitsHelper ¶
func NewSubCommitsHelper( c *HelperCommon, refreshHelper *RefreshHelper, setSubCommits func([]*models.Commit), ) *SubCommitsHelper
func (*SubCommitsHelper) ViewSubCommits ¶
func (self *SubCommitsHelper) ViewSubCommits(opts ViewSubCommitsOpts) error
type SuggestionsHelper ¶
type SuggestionsHelper struct {
// contains filtered or unexported fields
}
func NewSuggestionsHelper ¶
func NewSuggestionsHelper( c *HelperCommon, ) *SuggestionsHelper
func (*SuggestionsHelper) GetAuthorsSuggestionsFunc ¶
func (self *SuggestionsHelper) GetAuthorsSuggestionsFunc() func(string) []*types.Suggestion
func (*SuggestionsHelper) GetBranchNameSuggestionsFunc ¶
func (self *SuggestionsHelper) GetBranchNameSuggestionsFunc() func(string) []*types.Suggestion
func (*SuggestionsHelper) GetFilePathSuggestionsFunc ¶
func (self *SuggestionsHelper) GetFilePathSuggestionsFunc() func(string) []*types.Suggestion
here we asynchronously fetch the latest set of paths in the repo and store in self.c.Model().FilesTrie. On the main thread we'll be doing a fuzzy search via self.c.Model().FilesTrie. So if we've looked for a file previously, we'll start with the old trie and eventually it'll be swapped out for the new one. Notably, unlike other suggestion functions we're not showing all the options if nothing has been typed because there'll be too much to display efficiently
func (*SuggestionsHelper) GetRefsSuggestionsFunc ¶
func (self *SuggestionsHelper) GetRefsSuggestionsFunc() func(string) []*types.Suggestion
func (*SuggestionsHelper) GetRemoteBranchesSuggestionsFunc ¶
func (self *SuggestionsHelper) GetRemoteBranchesSuggestionsFunc(separator string) func(string) []*types.Suggestion
func (*SuggestionsHelper) GetRemoteSuggestionsFunc ¶
func (self *SuggestionsHelper) GetRemoteSuggestionsFunc() func(string) []*types.Suggestion
func (*SuggestionsHelper) GetTagsSuggestionsFunc ¶
func (self *SuggestionsHelper) GetTagsSuggestionsFunc() func(string) []*types.Suggestion
type TagsHelper ¶
type TagsHelper struct {
// contains filtered or unexported fields
}
func NewTagsHelper ¶
func NewTagsHelper(c *HelperCommon, commitsHelper *CommitsHelper) *TagsHelper
func (*TagsHelper) OpenCreateTagPrompt ¶
func (self *TagsHelper) OpenCreateTagPrompt(ref string, onCreate func()) error
type UpdateHelper ¶
type UpdateHelper struct {
// contains filtered or unexported fields
}
func NewUpdateHelper ¶
func NewUpdateHelper(c *HelperCommon, updater *updates.Updater) *UpdateHelper
func (*UpdateHelper) CheckForUpdateInBackground ¶
func (self *UpdateHelper) CheckForUpdateInBackground()
func (*UpdateHelper) CheckForUpdateInForeground ¶
func (self *UpdateHelper) CheckForUpdateInForeground() error
type UpstreamHelper ¶
type UpstreamHelper struct {
// contains filtered or unexported fields
}
func NewUpstreamHelper ¶
func NewUpstreamHelper( c *HelperCommon, getRemoteBranchesSuggestionsFunc func(string) func(string) []*types.Suggestion, ) *UpstreamHelper
func (*UpstreamHelper) GetSuggestedRemote ¶
func (self *UpstreamHelper) GetSuggestedRemote() string
func (*UpstreamHelper) ParseUpstream ¶
func (self *UpstreamHelper) ParseUpstream(upstream string) (string, string, error)
func (*UpstreamHelper) PromptForUpstreamWithInitialContent ¶
func (*UpstreamHelper) PromptForUpstreamWithoutInitialContent ¶
type ViewHelper ¶
type ViewHelper struct {
// contains filtered or unexported fields
}
func NewViewHelper ¶
func NewViewHelper(c *HelperCommon, contexts *context.ContextTree) *ViewHelper
func (*ViewHelper) ContextForView ¶
func (self *ViewHelper) ContextForView(viewName string) (types.Context, bool)
type ViewSubCommitsOpts ¶
type WindowArrangementArgs ¶
type WindowArrangementArgs struct { // Width of the screen (in characters) Width int // Height of the screen (in characters) Height int // User config UserConfig *config.UserConfig // Name of the currently focused window CurrentWindow string // Name of the current static window (meaning popups are ignored) CurrentStaticWindow string // Name of the current side window (i.e. the current window in the left // section of the UI) CurrentSideWindow string // Whether the main panel is split (as is the case e.g. when a file has both // staged and unstaged changes) SplitMainPanel bool // The current screen mode (normal, half, full) ScreenMode types.WindowMaximisation // The content shown on the bottom left of the screen when showing a loader // or toast e.g. 'Rebasing /' AppStatus string // The content shown on the bottom right of the screen (e.g. the 'donate', // 'ask question' links or a message about the current mode e.g. rebase mode) InformationStr string // Whether to show the extras window which contains the command log context ShowExtrasWindow bool // Whether we are in a demo (which is used for generating demo gifs for the // repo's readme) InDemo bool // Whether any mode is active (e.g. rebasing, cherry picking, etc) IsAnyModeActive bool // Whether the search prompt is shown in the bottom left InSearchPrompt bool // One of ” (not searching), 'Search: ', and 'Filter: ' SearchPrefix string }
type WindowArrangementHelper ¶
type WindowArrangementHelper struct {
// contains filtered or unexported fields
}
func NewWindowArrangementHelper ¶
func NewWindowArrangementHelper( c *HelperCommon, windowHelper *WindowHelper, modeHelper *ModeHelper, appStatusHelper *AppStatusHelper, ) *WindowArrangementHelper
func (*WindowArrangementHelper) GetWindowDimensions ¶
func (self *WindowArrangementHelper) GetWindowDimensions(informationStr string, appStatus string) map[string]boxlayout.Dimensions
type WindowHelper ¶
type WindowHelper struct {
// contains filtered or unexported fields
}
func NewWindowHelper ¶
func NewWindowHelper(c *HelperCommon, viewHelper *ViewHelper) *WindowHelper
func (*WindowHelper) CurrentWindow ¶
func (self *WindowHelper) CurrentWindow() string
func (*WindowHelper) GetContextForWindow ¶
func (self *WindowHelper) GetContextForWindow(window string) types.Context
func (*WindowHelper) GetViewNameForWindow ¶
func (self *WindowHelper) GetViewNameForWindow(window string) string
func (*WindowHelper) MoveToTopOfWindow ¶
func (self *WindowHelper) MoveToTopOfWindow(context types.Context)
moves given context's view to the top of the window
func (*WindowHelper) SetWindowContext ¶
func (self *WindowHelper) SetWindowContext(c types.Context)
for now all we actually care about is the context's view so we're storing that
func (*WindowHelper) SideWindows ¶
func (self *WindowHelper) SideWindows() []string
func (*WindowHelper) TopViewInWindow ¶
func (self *WindowHelper) TopViewInWindow(windowName string, includeInvisibleViews bool) *gocui.View
func (*WindowHelper) WindowForView ¶
func (self *WindowHelper) WindowForView(viewName string) string
type WorkingTreeHelper ¶
type WorkingTreeHelper struct {
// contains filtered or unexported fields
}
func NewWorkingTreeHelper ¶
func NewWorkingTreeHelper( c *HelperCommon, refHelper *RefsHelper, commitsHelper *CommitsHelper, gpgHelper *GpgHelper, ) *WorkingTreeHelper
func (*WorkingTreeHelper) AnyStagedFiles ¶
func (self *WorkingTreeHelper) AnyStagedFiles() bool
func (*WorkingTreeHelper) AnyTrackedFiles ¶
func (self *WorkingTreeHelper) AnyTrackedFiles() bool
func (*WorkingTreeHelper) FileForSubmodule ¶
func (self *WorkingTreeHelper) FileForSubmodule(submodule *models.SubmoduleConfig) *models.File
func (*WorkingTreeHelper) HandleCommitEditorPress ¶
func (self *WorkingTreeHelper) HandleCommitEditorPress() error
HandleCommitEditorPress - handle when the user wants to commit changes via their editor rather than via the popup panel
func (*WorkingTreeHelper) HandleCommitPress ¶
func (self *WorkingTreeHelper) HandleCommitPress() error
func (*WorkingTreeHelper) HandleCommitPressWithMessage ¶
func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage string) error
func (*WorkingTreeHelper) HandleWIPCommitPress ¶
func (self *WorkingTreeHelper) HandleWIPCommitPress() error
func (*WorkingTreeHelper) IsWorkingTreeDirty ¶
func (self *WorkingTreeHelper) IsWorkingTreeDirty() bool
func (*WorkingTreeHelper) OpenMergeTool ¶
func (self *WorkingTreeHelper) OpenMergeTool() error
func (*WorkingTreeHelper) WithEnsureCommitableFiles ¶
func (self *WorkingTreeHelper) WithEnsureCommitableFiles(handler func() error) error
type WorktreeHelper ¶
type WorktreeHelper struct {
// contains filtered or unexported fields
}
func NewWorktreeHelper ¶
func NewWorktreeHelper(c *HelperCommon, reposHelper *ReposHelper, refsHelper *RefsHelper, suggestionsHelper *SuggestionsHelper) *WorktreeHelper
func (*WorktreeHelper) GetLinkedWorktreeName ¶
func (self *WorktreeHelper) GetLinkedWorktreeName() string
If we're on the main worktree, we return an empty string
func (*WorktreeHelper) GetMainWorktreeName ¶
func (self *WorktreeHelper) GetMainWorktreeName() string
func (*WorktreeHelper) NewWorktree ¶
func (self *WorktreeHelper) NewWorktree() error
func (*WorktreeHelper) NewWorktreeCheckout ¶
func (self *WorktreeHelper) NewWorktreeCheckout(base string, canCheckoutBase bool, detached bool, contextKey types.ContextKey) error
func (*WorktreeHelper) Remove ¶
func (self *WorktreeHelper) Remove(worktree *models.Worktree, force bool) error
func (*WorktreeHelper) Switch ¶
func (self *WorktreeHelper) Switch(worktree *models.Worktree, contextKey types.ContextKey) error
func (*WorktreeHelper) ViewBranchWorktreeOptions ¶
func (self *WorktreeHelper) ViewBranchWorktreeOptions(branchName string, canCheckoutBase bool) error
func (*WorktreeHelper) ViewWorktreeOptions ¶
func (self *WorktreeHelper) ViewWorktreeOptions(context types.IListContext, ref string) error
Source Files ¶
- amend_helper.go
- app_status_helper.go
- bisect_helper.go
- branches_helper.go
- cherry_pick_helper.go
- commits_helper.go
- confirmation_helper.go
- credentials_helper.go
- diff_helper.go
- files_helper.go
- fixup_helper.go
- gpg_helper.go
- helpers.go
- host_helper.go
- inline_status_helper.go
- merge_and_rebase_helper.go
- merge_conflicts_helper.go
- mode_helper.go
- patch_building_helper.go
- record_directory_helper.go
- refresh_helper.go
- refs_helper.go
- repos_helper.go
- search_helper.go
- snake_helper.go
- staging_helper.go
- sub_commits_helper.go
- suggestions_helper.go
- tags_helper.go
- update_helper.go
- upstream_helper.go
- view_helper.go
- window_arrangement_helper.go
- window_helper.go
- working_tree_helper.go
- worktree_helper.go