Documentation ¶
Index ¶
- Constants
- func FuzzySearchFunc(options []string) func(string) []*types.Suggestion
- func MergeMaps[K comparable, V any](maps ...map[K]V) map[K]V
- type AmendHelper
- type AppStatusHelper
- type BisectHelper
- type CherryPickHelper
- func (self *CherryPickHelper) Copy(commit *models.Commit, commitsList []*models.Commit, context types.Context) error
- func (self *CherryPickHelper) CopyRange(selectedIndex int, commitsList []*models.Commit, context types.Context) error
- func (self *CherryPickHelper) Paste() error
- func (self *CherryPickHelper) Reset() error
- type CommitsHelper
- func (self *CommitsHelper) CloseCommitMessagePanel() error
- func (self *CommitsHelper) HandleCommitConfirm() error
- func (self *CommitsHelper) JoinCommitMessageAndDescription() string
- func (self *CommitsHelper) OnCommitSuccess()
- 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) 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
- 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 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 MergeAndRebaseHelper
- func (self *MergeAndRebaseHelper) AbortMergeOrRebaseWithConfirm() error
- func (self *MergeAndRebaseHelper) CheckForConflicts(result error) error
- func (self *MergeAndRebaseHelper) CheckMergeOrRebase(result error) 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(isFocused bool) error
- func (self *MergeConflictsHelper) ResetMergeState()
- func (self *MergeConflictsHelper) SetConflictsAndRender(path string, isFocused bool) (bool, error)
- func (self *MergeConflictsHelper) SetMergeState(path string) (bool, error)
- func (self *MergeConflictsHelper) SwitchToMerge(path string) error
- type ModeHelper
- 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) 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) RenderSearchStatus(c types.Context)
- type SnakeHelper
- type StagingHelper
- 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 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) *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) PromptToStageAllAndRetry(retry 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" )
const INFO_SECTION_PADDING = " "
Variables ¶
This section is empty.
Functions ¶
func FuzzySearchFunc ¶
func FuzzySearchFunc(options []string) func(string) []*types.Suggestion
func MergeMaps ¶ added in v0.39.0
func MergeMaps[K comparable, V any](maps ...map[K]V) map[K]V
Types ¶
type AmendHelper ¶ added in v0.38.0
type AmendHelper struct {
// contains filtered or unexported fields
}
func NewAmendHelper ¶ added in v0.38.0
func NewAmendHelper( c *HelperCommon, gpg *GpgHelper, ) *AmendHelper
func (*AmendHelper) AmendHead ¶ added in v0.38.0
func (self *AmendHelper) AmendHead() error
type AppStatusHelper ¶ added in v0.39.0
type AppStatusHelper struct {
// contains filtered or unexported fields
}
func NewAppStatusHelper ¶ added in v0.39.0
func NewAppStatusHelper(c *HelperCommon, statusMgr func() *status.StatusManager) *AppStatusHelper
func (*AppStatusHelper) GetStatusString ¶ added in v0.39.0
func (self *AppStatusHelper) GetStatusString() string
func (*AppStatusHelper) HasStatus ¶ added in v0.39.0
func (self *AppStatusHelper) HasStatus() bool
func (*AppStatusHelper) Toast ¶ added in v0.39.0
func (self *AppStatusHelper) Toast(message string)
func (*AppStatusHelper) WithWaitingStatus ¶ added in v0.39.0
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
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 CherryPickHelper ¶
type CherryPickHelper struct {
// contains filtered or unexported fields
}
func NewCherryPickHelper ¶
func NewCherryPickHelper( c *HelperCommon, rebaseHelper *MergeAndRebaseHelper, ) *CherryPickHelper
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 ¶ added in v0.38.0
type CommitsHelper struct {
// contains filtered or unexported fields
}
func NewCommitsHelper ¶ added in v0.38.0
func NewCommitsHelper( c *HelperCommon, getCommitSummary func() string, setCommitSummary func(string), getCommitDescription func() string, setCommitDescription func(string), ) *CommitsHelper
func (*CommitsHelper) CloseCommitMessagePanel ¶ added in v0.38.0
func (self *CommitsHelper) CloseCommitMessagePanel() error
func (*CommitsHelper) HandleCommitConfirm ¶ added in v0.38.0
func (self *CommitsHelper) HandleCommitConfirm() error
func (*CommitsHelper) JoinCommitMessageAndDescription ¶ added in v0.38.0
func (self *CommitsHelper) JoinCommitMessageAndDescription() string
func (*CommitsHelper) OnCommitSuccess ¶ added in v0.38.0
func (self *CommitsHelper) OnCommitSuccess()
func (*CommitsHelper) OpenCommitMessagePanel ¶ added in v0.38.0
func (self *CommitsHelper) OpenCommitMessagePanel(opts *OpenCommitMessagePanelOpts) error
func (*CommitsHelper) PopCommitMessageContexts ¶ added in v0.38.0
func (self *CommitsHelper) PopCommitMessageContexts() error
func (*CommitsHelper) SetMessageAndDescriptionInView ¶ added in v0.38.0
func (self *CommitsHelper) SetMessageAndDescriptionInView(message string)
func (*CommitsHelper) SplitCommitMessageAndDescription ¶ added in v0.38.0
func (self *CommitsHelper) SplitCommitMessageAndDescription(message string) (string, string)
func (*CommitsHelper) UpdateCommitPanelView ¶ added in v0.38.0
func (self *CommitsHelper) UpdateCommitPanelView(message string)
type ConfirmationHelper ¶ added in v0.39.0
type ConfirmationHelper struct {
// contains filtered or unexported fields
}
func NewConfirmationHelper ¶ added in v0.39.0
func NewConfirmationHelper(c *HelperCommon) *ConfirmationHelper
func (*ConfirmationHelper) CreatePopupPanel ¶ added in v0.39.0
func (self *ConfirmationHelper) CreatePopupPanel(ctx goContext.Context, opts types.CreatePopupPanelOpts) error
func (*ConfirmationHelper) DeactivateConfirmationPrompt ¶ added in v0.39.0
func (self *ConfirmationHelper) DeactivateConfirmationPrompt()
func (*ConfirmationHelper) IsPopupPanel ¶ added in v0.39.0
func (self *ConfirmationHelper) IsPopupPanel(viewName string) bool
func (*ConfirmationHelper) IsPopupPanelFocused ¶ added in v0.39.0
func (self *ConfirmationHelper) IsPopupPanelFocused() bool
func (*ConfirmationHelper) ResizeCommitMessagePanels ¶ added in v0.39.0
func (self *ConfirmationHelper) ResizeCommitMessagePanels()
func (*ConfirmationHelper) ResizeConfirmationPanel ¶ added in v0.39.0
func (self *ConfirmationHelper) ResizeConfirmationPanel()
func (*ConfirmationHelper) ResizeCurrentPopupPanel ¶ added in v0.39.0
func (self *ConfirmationHelper) ResizeCurrentPopupPanel() error
func (*ConfirmationHelper) ResizePopupPanel ¶ added in v0.39.0
func (self *ConfirmationHelper) ResizePopupPanel(v *gocui.View, content string) error
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 ¶ added in v0.39.0
type DiffHelper struct {
// contains filtered or unexported fields
}
func NewDiffHelper ¶ added in v0.39.0
func NewDiffHelper(c *HelperCommon) *DiffHelper
func (*DiffHelper) CurrentDiffTerminals ¶ added in v0.39.0
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 ¶ added in v0.39.0
func (self *DiffHelper) DiffArgs() []string
func (*DiffHelper) ExitDiffMode ¶ added in v0.39.0
func (self *DiffHelper) ExitDiffMode() error
func (*DiffHelper) IgnoringWhitespaceSubTitle ¶ added in v0.39.0
func (self *DiffHelper) IgnoringWhitespaceSubTitle() string
func (*DiffHelper) RenderDiff ¶ added in v0.39.0
func (self *DiffHelper) RenderDiff() error
func (*DiffHelper) WithDiffModeCheck ¶ added in v0.39.0
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 ¶ added in v0.38.0
func (self *FilesHelper) EditFileAtLineAndWait(filename string, lineNumber int) error
func (*FilesHelper) OpenDirInEditor ¶ added in v0.40.0
func (self *FilesHelper) OpenDirInEditor(path string) error
func (*FilesHelper) OpenFile ¶
func (self *FilesHelper) OpenFile(filename string) 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 ¶ added in v0.39.0
type HelperCommon struct { *common.Common types.IGuiCommon IGetContexts }
type Helpers ¶
type Helpers struct { Refs *RefsHelper Bisect *BisectHelper Suggestions *SuggestionsHelper Files *FilesHelper WorkingTree *WorkingTreeHelper Tags *TagsHelper MergeAndRebase *MergeAndRebaseHelper MergeConflicts *MergeConflictsHelper CherryPick *CherryPickHelper Host *HostHelper PatchBuilding *PatchBuildingHelper Staging *StagingHelper GPG *GpgHelper Upstream *UpstreamHelper AmendHelper *AmendHelper 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 WindowArrangement *WindowArrangementHelper Search *SearchHelper Worktree *WorktreeHelper }
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 ¶ added in v0.38.0
type ICommitsHelper interface {
UpdateCommitPanelView(message string)
}
type IFilesHelper ¶
type IGetContexts ¶ added in v0.39.0
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 ¶ added in v0.40.0
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 ¶ added in v0.39.0
func (self *MergeAndRebaseHelper) CheckForConflicts(result error) error
func (*MergeAndRebaseHelper) CheckMergeOrRebase ¶
func (self *MergeAndRebaseHelper) CheckMergeOrRebase(result error) error
func (*MergeAndRebaseHelper) CreateRebaseOptionsMenu ¶
func (self *MergeAndRebaseHelper) CreateRebaseOptionsMenu() error
func (*MergeAndRebaseHelper) MergeRefIntoCheckedOutBranch ¶
func (self *MergeAndRebaseHelper) MergeRefIntoCheckedOutBranch(refName string) error
func (*MergeAndRebaseHelper) PromptForConflictHandling ¶ added in v0.39.0
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 ¶ added in v0.40.0
func (self *MergeAndRebaseHelper) ResetMarkedBaseCommit() error
type MergeConflictsHelper ¶ added in v0.36.0
type MergeConflictsHelper struct {
// contains filtered or unexported fields
}
func NewMergeConflictsHelper ¶ added in v0.36.0
func NewMergeConflictsHelper( c *HelperCommon, ) *MergeConflictsHelper
func (*MergeConflictsHelper) EscapeMerge ¶ added in v0.36.0
func (self *MergeConflictsHelper) EscapeMerge() error
func (*MergeConflictsHelper) RefreshMergeState ¶ added in v0.39.0
func (self *MergeConflictsHelper) RefreshMergeState() error
func (*MergeConflictsHelper) Render ¶ added in v0.39.0
func (self *MergeConflictsHelper) Render(isFocused bool) error
func (*MergeConflictsHelper) ResetMergeState ¶ added in v0.36.0
func (self *MergeConflictsHelper) ResetMergeState()
func (*MergeConflictsHelper) SetConflictsAndRender ¶ added in v0.36.0
func (self *MergeConflictsHelper) SetConflictsAndRender(path string, isFocused bool) (bool, error)
func (*MergeConflictsHelper) SetMergeState ¶ added in v0.36.0
func (self *MergeConflictsHelper) SetMergeState(path string) (bool, error)
func (*MergeConflictsHelper) SwitchToMerge ¶ added in v0.36.0
func (self *MergeConflictsHelper) SwitchToMerge(path string) error
type ModeHelper ¶ added in v0.39.0
type ModeHelper struct {
// contains filtered or unexported fields
}
func NewModeHelper ¶ added in v0.39.0
func NewModeHelper( c *HelperCommon, diffHelper *DiffHelper, patchBuildingHelper *PatchBuildingHelper, cherryPickHelper *CherryPickHelper, mergeAndRebaseHelper *MergeAndRebaseHelper, bisectHelper *BisectHelper, ) *ModeHelper
func (*ModeHelper) ClearFiltering ¶ added in v0.39.0
func (self *ModeHelper) ClearFiltering() error
func (*ModeHelper) ExitFilterMode ¶ added in v0.39.0
func (self *ModeHelper) ExitFilterMode() error
func (*ModeHelper) GetActiveMode ¶ added in v0.39.0
func (self *ModeHelper) GetActiveMode() (ModeStatus, bool)
func (*ModeHelper) IsAnyModeActive ¶ added in v0.39.0
func (self *ModeHelper) IsAnyModeActive() bool
func (*ModeHelper) Statuses ¶ added in v0.39.0
func (self *ModeHelper) Statuses() []ModeStatus
type ModeStatus ¶ added in v0.39.0
type OpenCommitMessagePanelOpts ¶ added in v0.38.0
type PatchBuildingHelper ¶
type PatchBuildingHelper struct {
// contains filtered or unexported fields
}
func NewPatchBuildingHelper ¶
func NewPatchBuildingHelper( c *HelperCommon, ) *PatchBuildingHelper
func (*PatchBuildingHelper) Escape ¶ added in v0.36.0
func (self *PatchBuildingHelper) Escape() error
takes us from the patch building panel back to the commit files panel
func (*PatchBuildingHelper) RefreshPatchBuildingPanel ¶ added in v0.39.0
func (self *PatchBuildingHelper) RefreshPatchBuildingPanel(opts types.OnFocusOpts) error
func (*PatchBuildingHelper) Reset ¶ added in v0.36.0
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 ¶ added in v0.39.0
type RecordDirectoryHelper struct {
// contains filtered or unexported fields
}
func NewRecordDirectoryHelper ¶ added in v0.39.0
func NewRecordDirectoryHelper(c *HelperCommon) *RecordDirectoryHelper
func (*RecordDirectoryHelper) RecordCurrentDirectory ¶ added in v0.39.0
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 ¶ added in v0.39.0
func (self *RecordDirectoryHelper) RecordDirectory(dirName string) error
type RefreshHelper ¶ added in v0.39.0
type RefreshHelper struct {
// contains filtered or unexported fields
}
func NewRefreshHelper ¶ added in v0.39.0
func NewRefreshHelper( c *HelperCommon, refsHelper *RefsHelper, mergeAndRebaseHelper *MergeAndRebaseHelper, patchBuildingHelper *PatchBuildingHelper, stagingHelper *StagingHelper, mergeConflictsHelper *MergeConflictsHelper, worktreeHelper *WorktreeHelper, ) *RefreshHelper
func (*RefreshHelper) Refresh ¶ added in v0.39.0
func (self *RefreshHelper) Refresh(options types.RefreshOptions) error
func (*RefreshHelper) RefreshAuthors ¶ added in v0.39.3
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) 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 ¶ added in v0.39.0
type ReposHelper struct {
// contains filtered or unexported fields
}
helps switch back and forth between repos
func NewRecentReposHelper ¶ added in v0.39.0
func NewRecentReposHelper( c *HelperCommon, recordDirectoryHelper *RecordDirectoryHelper, onNewRepo onNewRepoFn, ) *ReposHelper
func (*ReposHelper) CreateRecentReposMenu ¶ added in v0.39.0
func (self *ReposHelper) CreateRecentReposMenu() error
func (*ReposHelper) DispatchSwitchTo ¶ added in v0.40.0
func (self *ReposHelper) DispatchSwitchTo(path string, errMsg string, contextKey types.ContextKey) error
func (*ReposHelper) DispatchSwitchToRepo ¶ added in v0.39.0
func (self *ReposHelper) DispatchSwitchToRepo(path string, contextKey types.ContextKey) error
func (*ReposHelper) EnterSubmodule ¶ added in v0.39.0
func (self *ReposHelper) EnterSubmodule(submodule *models.SubmoduleConfig) error
type SearchHelper ¶ added in v0.39.0
type SearchHelper struct {
// contains filtered or unexported fields
}
func NewSearchHelper ¶ added in v0.39.0
func NewSearchHelper( c *HelperCommon, ) *SearchHelper
func (*SearchHelper) Cancel ¶ added in v0.39.0
func (self *SearchHelper) Cancel()
func (*SearchHelper) CancelPrompt ¶ added in v0.39.0
func (self *SearchHelper) CancelPrompt() error
func (*SearchHelper) CancelSearchIfSearching ¶ added in v0.39.0
func (self *SearchHelper) CancelSearchIfSearching(c types.Context)
func (*SearchHelper) Confirm ¶ added in v0.39.0
func (self *SearchHelper) Confirm() error
func (*SearchHelper) ConfirmFilter ¶ added in v0.39.0
func (self *SearchHelper) ConfirmFilter() error
func (*SearchHelper) ConfirmSearch ¶ added in v0.39.0
func (self *SearchHelper) ConfirmSearch() error
func (*SearchHelper) DisplayFilterStatus ¶ added in v0.39.0
func (self *SearchHelper) DisplayFilterStatus(context types.IFilterableContext)
func (*SearchHelper) DisplaySearchStatus ¶ added in v0.39.0
func (self *SearchHelper) DisplaySearchStatus(context types.ISearchableContext)
func (*SearchHelper) HidePrompt ¶ added in v0.39.0
func (self *SearchHelper) HidePrompt()
func (*SearchHelper) OnPromptContentChanged ¶ added in v0.39.0
func (self *SearchHelper) OnPromptContentChanged(searchString string)
func (*SearchHelper) OpenFilterPrompt ¶ added in v0.39.0
func (self *SearchHelper) OpenFilterPrompt(context types.IFilterableContext) error
func (*SearchHelper) OpenSearchPrompt ¶ added in v0.39.0
func (self *SearchHelper) OpenSearchPrompt(context types.ISearchableContext) error
func (*SearchHelper) RenderSearchStatus ¶ added in v0.39.0
func (self *SearchHelper) RenderSearchStatus(c types.Context)
type SnakeHelper ¶ added in v0.39.0
type SnakeHelper struct {
// contains filtered or unexported fields
}
func NewSnakeHelper ¶ added in v0.39.0
func NewSnakeHelper(c *HelperCommon) *SnakeHelper
func (*SnakeHelper) ExitGame ¶ added in v0.39.0
func (self *SnakeHelper) ExitGame()
func (*SnakeHelper) SetDirection ¶ added in v0.39.0
func (self *SnakeHelper) SetDirection(direction snake.Direction)
func (*SnakeHelper) StartGame ¶ added in v0.39.0
func (self *SnakeHelper) StartGame()
type StagingHelper ¶ added in v0.39.0
type StagingHelper struct {
// contains filtered or unexported fields
}
func NewStagingHelper ¶ added in v0.39.0
func NewStagingHelper( c *HelperCommon, ) *StagingHelper
func (*StagingHelper) RefreshStagingPanel ¶ added in v0.39.0
func (self *StagingHelper) RefreshStagingPanel(focusOpts types.OnFocusOpts) error
NOTE: used from outside this file
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 ¶ added in v0.39.0
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 ¶ added in v0.39.3
func (self *TagsHelper) OpenCreateTagPrompt(ref string, onCreate func()) error
type UpdateHelper ¶ added in v0.39.0
type UpdateHelper struct {
// contains filtered or unexported fields
}
func NewUpdateHelper ¶ added in v0.39.0
func NewUpdateHelper(c *HelperCommon, updater *updates.Updater) *UpdateHelper
func (*UpdateHelper) CheckForUpdateInBackground ¶ added in v0.39.0
func (self *UpdateHelper) CheckForUpdateInBackground()
func (*UpdateHelper) CheckForUpdateInForeground ¶ added in v0.39.0
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 ¶ added in v0.39.0
type ViewHelper struct {
// contains filtered or unexported fields
}
func NewViewHelper ¶ added in v0.39.0
func NewViewHelper(c *HelperCommon, contexts *context.ContextTree) *ViewHelper
func (*ViewHelper) ContextForView ¶ added in v0.39.0
func (self *ViewHelper) ContextForView(viewName string) (types.Context, bool)
type WindowArrangementHelper ¶ added in v0.39.0
type WindowArrangementHelper struct {
// contains filtered or unexported fields
}
func NewWindowArrangementHelper ¶ added in v0.39.0
func NewWindowArrangementHelper( c *HelperCommon, windowHelper *WindowHelper, modeHelper *ModeHelper, appStatusHelper *AppStatusHelper, ) *WindowArrangementHelper
func (*WindowArrangementHelper) GetWindowDimensions ¶ added in v0.39.0
func (self *WindowArrangementHelper) GetWindowDimensions(informationStr string, appStatus string) map[string]boxlayout.Dimensions
type WindowHelper ¶ added in v0.39.0
type WindowHelper struct {
// contains filtered or unexported fields
}
func NewWindowHelper ¶ added in v0.39.0
func NewWindowHelper(c *HelperCommon, viewHelper *ViewHelper) *WindowHelper
func (*WindowHelper) CurrentWindow ¶ added in v0.39.0
func (self *WindowHelper) CurrentWindow() string
func (*WindowHelper) GetContextForWindow ¶ added in v0.39.0
func (self *WindowHelper) GetContextForWindow(window string) types.Context
func (*WindowHelper) GetViewNameForWindow ¶ added in v0.39.0
func (self *WindowHelper) GetViewNameForWindow(window string) string
func (*WindowHelper) MoveToTopOfWindow ¶ added in v0.39.0
func (self *WindowHelper) MoveToTopOfWindow(context types.Context)
moves given context's view to the top of the window
func (*WindowHelper) SetWindowContext ¶ added in v0.39.0
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 ¶ added in v0.39.0
func (self *WindowHelper) SideWindows() []string
func (*WindowHelper) TopViewInWindow ¶ added in v0.39.0
func (self *WindowHelper) TopViewInWindow(windowName string) *gocui.View
func (*WindowHelper) WindowForView ¶ added in v0.39.0
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 ¶ added in v0.37.0
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 ¶ added in v0.37.0
func (self *WorkingTreeHelper) HandleCommitPress() error
func (*WorkingTreeHelper) HandleCommitPressWithMessage ¶ added in v0.38.0
func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage string) error
func (*WorkingTreeHelper) HandleWIPCommitPress ¶ added in v0.37.0
func (self *WorkingTreeHelper) HandleWIPCommitPress() error
func (*WorkingTreeHelper) IsWorkingTreeDirty ¶
func (self *WorkingTreeHelper) IsWorkingTreeDirty() bool
func (*WorkingTreeHelper) OpenMergeTool ¶
func (self *WorkingTreeHelper) OpenMergeTool() error
func (*WorkingTreeHelper) PromptToStageAllAndRetry ¶ added in v0.37.0
func (self *WorkingTreeHelper) PromptToStageAllAndRetry(retry func() error) error
type WorktreeHelper ¶ added in v0.40.0
type WorktreeHelper struct {
// contains filtered or unexported fields
}
func NewWorktreeHelper ¶ added in v0.40.0
func NewWorktreeHelper(c *HelperCommon, reposHelper *ReposHelper, refsHelper *RefsHelper, suggestionsHelper *SuggestionsHelper) *WorktreeHelper
func (*WorktreeHelper) Detach ¶ added in v0.40.0
func (self *WorktreeHelper) Detach(worktree *models.Worktree) error
func (*WorktreeHelper) GetLinkedWorktreeName ¶ added in v0.40.0
func (self *WorktreeHelper) GetLinkedWorktreeName() string
If we're on the main worktree, we return an empty string
func (*WorktreeHelper) GetMainWorktreeName ¶ added in v0.40.0
func (self *WorktreeHelper) GetMainWorktreeName() string
func (*WorktreeHelper) NewWorktree ¶ added in v0.40.0
func (self *WorktreeHelper) NewWorktree() error
func (*WorktreeHelper) NewWorktreeCheckout ¶ added in v0.40.0
func (self *WorktreeHelper) NewWorktreeCheckout(base string, canCheckoutBase bool, detached bool, contextKey types.ContextKey) error
func (*WorktreeHelper) Remove ¶ added in v0.40.0
func (self *WorktreeHelper) Remove(worktree *models.Worktree, force bool) error
func (*WorktreeHelper) Switch ¶ added in v0.40.0
func (self *WorktreeHelper) Switch(worktree *models.Worktree, contextKey types.ContextKey) error
func (*WorktreeHelper) ViewBranchWorktreeOptions ¶ added in v0.40.0
func (self *WorktreeHelper) ViewBranchWorktreeOptions(branchName string, canCheckoutBase bool) error
func (*WorktreeHelper) ViewWorktreeOptions ¶ added in v0.40.0
func (self *WorktreeHelper) ViewWorktreeOptions(context types.IListContext, ref string) error
Source Files ¶
- amend_helper.go
- app_status_helper.go
- bisect_helper.go
- cherry_pick_helper.go
- commits_helper.go
- confirmation_helper.go
- credentials_helper.go
- diff_helper.go
- files_helper.go
- gpg_helper.go
- helpers.go
- host_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
- 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