repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/search_helper.go
pkg/gui/controllers/helpers/search_helper.go
package helpers import ( "fmt" "strings" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/keybindings" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pk...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/gpg_helper.go
pkg/gui/controllers/helpers/gpg_helper.go
package helpers import ( "fmt" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type GpgHelper struct { c *HelperCommon } func NewGpgHelper(c *HelperCommon...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/merge_conflicts_helper.go
pkg/gui/controllers/helpers/merge_conflicts_helper.go
package helpers import ( "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type MergeConflictsHelper struct { c *HelperCommon } func NewMergeConflictsHelper( c *HelperCommon, ) *MergeConflictsHelper { return &MergeConflictsHelper{ c: c, } } func (self *Mer...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/upstream_helper.go
pkg/gui/controllers/helpers/upstream_helper.go
package helpers import ( "errors" "strings" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type UpstreamHelper struct { c *HelperCommon getRemoteBranchesSuggestionsFunc func(string) func(string) []*types.Suggestion } func NewUpstreamHelper( c *Helpe...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/signal_handling.go
pkg/gui/controllers/helpers/signal_handling.go
//go:build !windows package helpers import ( "os" "os/signal" "syscall" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" ) func canSuspendApp() bool { return true } func sendStopSignal() error { return syscall.Kill(0, syscall.SIGSTOP) } // setForegroundPgrp sets the current process group as the foregro...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/commits_helper_test.go
pkg/gui/controllers/helpers/commits_helper_test.go
package helpers import ( "testing" "github.com/stretchr/testify/assert" ) func TestTryRemoveHardLineBreaks(t *testing.T) { scenarios := []struct { name string message string autoWrapWidth int expectedResult string }{ { name: "empty", message: "", autoWrapWidt...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/diff_helper.go
pkg/gui/controllers/helpers/diff_helper.go
package helpers import ( "strings" "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/commands/patch" "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/modes/diffing"...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/upstream_helper_test.go
pkg/gui/controllers/helpers/upstream_helper_test.go
package helpers import ( "testing" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/samber/lo" "github.com/stretchr/testify/assert" ) func TestGetSuggestedRemote(t *testing.T) { cases := []struct { remotes []*models.Remote expected string }{ {mkRemoteList(), "origin"}, {mkRemoteList(...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/tags_helper.go
pkg/gui/controllers/helpers/tags_helper.go
package helpers import ( "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/utils" ) type TagsHelper struc...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/signal_handling_windows.go
pkg/gui/controllers/helpers/signal_handling_windows.go
package helpers import ( "github.com/sirupsen/logrus" ) func canSuspendApp() bool { return false } func sendStopSignal() error { return nil } func installResumeSignalHandler(log *logrus.Entry, onResume func() error) { }
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/app_status_helper.go
pkg/gui/controllers/helpers/app_status_helper.go
package helpers import ( "time" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/gui/status" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type AppStatusHelper struct { c *HelperCommon statusMgr func() *status.StatusManager modeHelper *ModeHelper } func NewAppStatusHelper(c *Help...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/confirmation_helper.go
pkg/gui/controllers/helpers/confirmation_helper.go
package helpers import ( goContext "context" "fmt" "strings" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/utils" ) type ConfirmationHelper struct { c *HelperCommon } func N...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/files_helper.go
pkg/gui/controllers/helpers/files_helper.go
package helpers import ( "path/filepath" "github.com/samber/lo" ) type FilesHelper struct { c *HelperCommon } func NewFilesHelper(c *HelperCommon) *FilesHelper { return &FilesHelper{ c: c, } } func (self *FilesHelper) EditFiles(filenames []string) error { absPaths := lo.Map(filenames, func(filename string,...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/staging_helper.go
pkg/gui/controllers/helpers/staging_helper.go
package helpers import ( "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/patch_exploring" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type StagingHelper struct { c *HelperCommon } func NewStagingHelper( c *HelperCommon, ) *StagingHelper { return &StagingH...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/credentials_helper.go
pkg/gui/controllers/helpers/credentials_helper.go
package helpers import ( "github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type CredentialsHelper struct { c *HelperCommon } func NewCredentialsHelper( c *HelperCommon, ) *CredentialsHelper { return &CredentialsHelper{ c: c, } } // PromptUserForCre...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/window_arrangement_helper.go
pkg/gui/controllers/helpers/window_arrangement_helper.go
package helpers import ( "fmt" mapsPkg "maps" "math" "strings" "github.com/jesseduffield/lazycore/pkg/boxlayout" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/utils" "golang.org/x/exp/slices" ) // In this file we use the ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/record_directory_helper.go
pkg/gui/controllers/helpers/record_directory_helper.go
package helpers import ( "os" ) type RecordDirectoryHelper struct { c *HelperCommon } func NewRecordDirectoryHelper(c *HelperCommon) *RecordDirectoryHelper { return &RecordDirectoryHelper{ c: c, } } // when a user runs lazygit with the LAZYGIT_NEW_DIR_FILE env variable defined // we will write the current dir...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/patch_building_helper.go
pkg/gui/controllers/helpers/patch_building_helper.go
package helpers import ( "errors" "fmt" "github.com/jesseduffield/lazygit/pkg/commands/patch" "github.com/jesseduffield/lazygit/pkg/gui/keybindings" "github.com/jesseduffield/lazygit/pkg/gui/patch_exploring" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type PatchBuildingHelper struct { c *HelperCommon }...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/fixup_helper_test.go
pkg/gui/controllers/helpers/fixup_helper_test.go
package helpers import ( "testing" "github.com/stretchr/testify/assert" ) func TestFixupHelper_parseDiff(t *testing.T) { scenarios := []struct { name string diff string expectedDeletedLineHunks []*hunk expectedAddedLineHunks []*hunk }{ { name: ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/amend_helper.go
pkg/gui/controllers/helpers/amend_helper.go
package helpers import "github.com/jesseduffield/lazygit/pkg/commands/git_commands" type AmendHelper struct { c *HelperCommon gpg *GpgHelper } func NewAmendHelper( c *HelperCommon, gpg *GpgHelper, ) *AmendHelper { return &AmendHelper{ c: c, gpg: gpg, } } func (self *AmendHelper) AmendHead() error { c...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/refs_helper.go
pkg/gui/controllers/helpers/refs_helper.go
package helpers import ( "fmt" "strings" "text/template" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/style" "gi...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/snake_helper.go
pkg/gui/controllers/helpers/snake_helper.go
package helpers import ( "errors" "fmt" "strings" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/snake" ) type SnakeHelper struct { c *HelperCommon game *snake.Game } func NewSnakeHelper(c *HelperCommon) *SnakeHelper { return &SnakeHelper{ c: c, } } func (self ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/suspend_resume_helper.go
pkg/gui/controllers/helpers/suspend_resume_helper.go
package helpers type SuspendResumeHelper struct { c *HelperCommon } func NewSuspendResumeHelper(c *HelperCommon) *SuspendResumeHelper { return &SuspendResumeHelper{ c: c, } } func (s *SuspendResumeHelper) CanSuspendApp() bool { return canSuspendApp() } func (s *SuspendResumeHelper) SuspendApp() error { if !c...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/helpers.go
pkg/gui/controllers/helpers/helpers.go
package helpers import ( "github.com/jesseduffield/lazygit/pkg/common" "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type HelperCommon struct { *common.Common types.IGuiCommon IGetContexts } type IGetContexts interface { Contexts() *context.ContextTree }...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/controllers/helpers/view_helper.go
pkg/gui/controllers/helpers/view_helper.go
package helpers import ( "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type ViewHelper struct { c *HelperCommon } func NewViewHelper(c *HelperCommon, contexts *context.ContextTree) *ViewHelper { return &ViewHelper{ c: c, } } func (self *ViewHelper) Cont...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/item_operations.go
pkg/gui/presentation/item_operations.go
package presentation import ( "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/i18n" ) func ItemOperationToString(itemOperation types.ItemOperation, tr *i18n.TranslationSet) string { switch itemOperation { case types.ItemOperationNone: return "" case types.ItemOperationPus...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/files_test.go
pkg/gui/presentation/files_test.go
package presentation import ( "strings" "testing" "github.com/gookit/color" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/commands/patch" "github.com/jesseduffield/lazygit/pkg/common" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/loader.go
pkg/gui/presentation/loader.go
package presentation import ( "time" "github.com/jesseduffield/lazygit/pkg/config" ) // Loader dumps a string to be displayed as a loader func Loader(now time.Time, config config.SpinnerConfig) string { milliseconds := now.UnixMilli() index := milliseconds / int64(config.Rate) % int64(len(config.Frames)) return...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/status.go
pkg/gui/presentation/status.go
package presentation import ( "fmt" "time" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/gui/presentation/icons" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/gui/types" "githu...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/submodules.go
pkg/gui/presentation/submodules.go
package presentation import ( "strings" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/theme" "github.com/samber/lo" ) func GetSubmoduleListDisplayStrings(submodules []*models.SubmoduleConfig) [][]string { return lo.Map(submodules, func(submodule *models.SubmoduleCo...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/tags.go
pkg/gui/presentation/tags.go
package presentation import ( "time" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/gui/presentation/icons" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/j...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/stash_entries.go
pkg/gui/presentation/stash_entries.go
package presentation import ( "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/presentation/icons" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/theme" "github.com/samber/lo" ) func GetStashEntryListDisplayStrings(stashEntri...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/suggestions.go
pkg/gui/presentation/suggestions.go
package presentation import ( "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/samber/lo" ) func GetSuggestionListDisplayStrings(suggestions []*types.Suggestion) [][]string { return lo.Map(suggestions, func(suggestion *types.Suggestion, _ int) []string { return getSuggestionDisplayStrings(suggestion)...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/remote_branches.go
pkg/gui/presentation/remote_branches.go
package presentation import ( "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/presentation/icons" "github.com/jesseduffield/lazygit/pkg/theme" "github.com/samber/lo" ) func GetRemoteBranchListDisplayStrings(branches []*models.RemoteBranch, diffName string) [][]stri...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/files.go
pkg/gui/presentation/files.go
package presentation import ( "strings" "github.com/gookit/color" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/commands/patch" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/gui/filetree" "github.com/jesseduffield/lazygit/pkg/...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/commits_test.go
pkg/gui/presentation/commits_test.go
package presentation import ( "os" "strings" "testing" "time" "github.com/gookit/color" "github.com/jesseduffield/generics/set" "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/common" "github.com/jessed...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/remotes.go
pkg/gui/presentation/remotes.go
package presentation import ( "time" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/gui/presentation/icons" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/j...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/reflog_commits.go
pkg/gui/presentation/reflog_commits.go
package presentation import ( "time" "github.com/jesseduffield/generics/set" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/kyokomi/emoji/v2" "github.c...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/branches_test.go
pkg/gui/presentation/branches_test.go
package presentation import ( "fmt" "sync/atomic" "testing" "time" "github.com/gookit/color" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/common" "github.com/jesseduffield/lazygit/pkg/gui/presentation/icons" "github.com/jesseduffield/lazygit/pkg/gui/types" "gi...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/branches.go
pkg/gui/presentation/branches.go
package presentation import ( "fmt" "regexp" "strings" "time" "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/gui/presentation/icons" "github.com/jesseduffie...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/commits.go
pkg/gui/presentation/commits.go
package presentation import ( "fmt" "strings" "time" "github.com/jesseduffield/generics/set" "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/common" "github.com/jesseduffield/lazygit/pkg/gui/presentation/...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/worktrees.go
pkg/gui/presentation/worktrees.go
package presentation import ( "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/presentation/icons" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/i18n" "github.com/jesseduffield/lazygit/pkg/theme" "github.com/samber/lo" ) fu...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/authors/authors_test.go
pkg/gui/presentation/authors/authors_test.go
package authors import ( "testing" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/stretchr/testify/assert" ) func TestGetInitials(t *testing.T) { for input, expectedOutput := range map[string]string{ "Jesse Duffield": "JD", "Jesse Duffield Man": "JD", "JesseDuffield": "Je", "J": ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/authors/authors.go
pkg/gui/presentation/authors/authors.go
package authors import ( "crypto/md5" "strings" "github.com/gookit/color" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/lucasb-eyer/go-colorful" "github.com/rivo/uniseg" ) type authorNameCacheKey struct { authorName string truncateTo int } // if t...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/icons/icons.go
pkg/gui/presentation/icons/icons.go
package icons import ( "log" "github.com/samber/lo" ) type IconProperties struct { Icon string Color string } var isIconEnabled = false func IsIconEnabled() bool { return isIconEnabled } func SetNerdFontsVersion(version string) { if version == "" { isIconEnabled = false } else { if !lo.Contains([]stri...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/icons/file_icons_test.go
pkg/gui/presentation/icons/file_icons_test.go
package icons import ( "testing" ) func TestFileIcons(t *testing.T) { t.Run("TestFileIcons", func(t *testing.T) { for name, icon := range nameIconMap { if len([]rune(icon.Icon)) != 1 { t.Errorf("nameIconMap[\"%s\"] is not a single rune", name) } } for ext, icon := range extIconMap { if len([]run...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/icons/git_icons.go
pkg/gui/presentation/icons/git_icons.go
package icons import ( "strings" "github.com/jesseduffield/lazygit/pkg/commands/models" ) var ( BRANCH_ICON = "\U000f062c" // 󰘬 DETACHED_HEAD_ICON = "\ue729" //  TAG_ICON = "\uf02b" //  COMMIT_ICON = "\U000f0718" // 󰜘 MERGE_COMMIT_ICO...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/icons/file_icons.go
pkg/gui/presentation/icons/file_icons.go
package icons import ( "path/filepath" "strings" "github.com/jesseduffield/lazygit/pkg/config" ) // NOTE: Visit next links for inspiration: // https://github.com/eza-community/eza/blob/main/src/output/icons.rs // https://github.com/nvim-tree/nvim-web-devicons/tree/master/lua/nvim-web-devicons/default var ( DEFA...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
true
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/graph/graph_test.go
pkg/gui/presentation/graph/graph_test.go
package graph import ( "fmt" "math/rand" "strings" "testing" "github.com/gookit/color" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/presentation/authors" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/utils" "github....
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/graph/cell.go
pkg/gui/presentation/graph/cell.go
package graph import ( "io" "sync" "github.com/gookit/color" "github.com/jesseduffield/lazygit/pkg/gui/style" ) const ( MergeSymbol = '⏣' CommitSymbol = '◯' ) type cellType int const ( CONNECTION cellType = iota COMMIT MERGE ) type Cell struct { up, down, left, right bool cellType cellTyp...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/presentation/graph/graph.go
pkg/gui/presentation/graph/graph.go
package graph import ( "cmp" "runtime" "slices" "strings" "sync" "github.com/jesseduffield/generics/set" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/samber/lo" ) type PipeKind uint8 const (...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/patch_exploring/state.go
pkg/gui/patch_exploring/state.go
package patch_exploring import ( "strings" "github.com/jesseduffield/generics/set" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/commands/patch" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/samber/lo" ) // State represents the current state of the patch explorer context i.e...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/patch_exploring/focus.go
pkg/gui/patch_exploring/focus.go
package patch_exploring func calculateOrigin(currentOrigin int, bufferHeight int, numLines int, firstLineIdx int, lastLineIdx int, selectedLineIdx int, mode selectMode) int { needToSeeIdx, wantToSeeIdx := getNeedAndWantLineIdx(firstLineIdx, lastLineIdx, selectedLineIdx, mode) return calculateNewOriginWithNeededAndW...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/patch_exploring/focus_test.go
pkg/gui/patch_exploring/focus_test.go
package patch_exploring import ( "testing" "github.com/stretchr/testify/assert" ) func TestNewOrigin(t *testing.T) { type scenario struct { name string origin int bufferHeight int numLines int firstLineIdx int lastLineIdx int selectedLineIdx int selectMode ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/keybindings.go
pkg/gui/types/keybindings.go
package types import ( "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/gui/style" ) type Key any // FIXME: find out how to get `gocui.Key | rune` // Binding - a keybinding mapping a key and modifier to a handler. The keypress // is only handled if the given view has focus, or handled globall...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/modes.go
pkg/gui/types/modes.go
package types import ( "github.com/jesseduffield/lazygit/pkg/gui/modes/cherrypicking" "github.com/jesseduffield/lazygit/pkg/gui/modes/diffing" "github.com/jesseduffield/lazygit/pkg/gui/modes/filtering" "github.com/jesseduffield/lazygit/pkg/gui/modes/marked_base_commit" ) type Modes struct { Filtering filt...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/version_number_test.go
pkg/gui/types/version_number_test.go
package types import ( "errors" "testing" "github.com/stretchr/testify/assert" ) func TestParseVersionNumber(t *testing.T) { tests := []struct { versionStr string expected *VersionNumber err error }{ { versionStr: "1.2.3", expected: &VersionNumber{ Major: 1, Minor: 2, Patch: 3...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/common_commands.go
pkg/gui/types/common_commands.go
package types type CheckoutRefOptions struct { WaitingStatus string EnvVars []string OnRefNotFound func(ref string) error }
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/refresh.go
pkg/gui/types/refresh.go
package types // models/views that we can refresh type RefreshableView int const ( COMMITS RefreshableView = iota REBASE_COMMITS SUB_COMMITS BRANCHES FILES STASH REFLOG TAGS REMOTES WORKTREES STATUS SUBMODULES STAGING PATCH_BUILDING MERGE_CONFLICTS COMMIT_FILES // not actually a view. Will refactor t...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/views.go
pkg/gui/types/views.go
package types import "github.com/jesseduffield/gocui" type Views struct { Status *gocui.View Submodules *gocui.View Files *gocui.View Branches *gocui.View Remotes *gocui.View Worktrees *gocui.View Tags *gocui.View RemoteBranches *gocui.View ReflogCommits *goc...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/suggestion.go
pkg/gui/types/suggestion.go
package types type Suggestion struct { // value is the thing that we're matching on and the thing that will be submitted if you select the suggestion Value string // label is what is actually displayed so it can e.g. contain color Label string } // Conforming to the HasID interface, which is needed for list conte...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/rendering.go
pkg/gui/types/rendering.go
package types import ( "os/exec" ) type MainContextPair struct { Main Context Secondary Context } func NewMainContextPair(main Context, secondary Context) MainContextPair { return MainContextPair{Main: main, Secondary: secondary} } type MainViewPairs struct { Normal MainContextPair MergeConflicts...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/context.go
pkg/gui/types/context.go
package types import ( "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/gui/patch_exploring" "github.com/jesseduffield/lazygit/pkg/i18n" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/sasha-s/go-deadlock" ) type ContextKind int const...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/version_number.go
pkg/gui/types/version_number.go
package types import ( "errors" "regexp" "strconv" ) type VersionNumber struct { Major, Minor, Patch int } func (v *VersionNumber) IsOlderThan(otherVersion *VersionNumber) bool { this := v.Major*1000*1000 + v.Minor*1000 + v.Patch other := otherVersion.Major*1000*1000 + otherVersion.Minor*1000 + otherVersion.Pa...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/search_state.go
pkg/gui/types/search_state.go
package types type SearchType int const ( SearchTypeNone SearchType = iota // searching is where matches are highlighted but the content is not filtered down SearchTypeSearch // filter is where the list is filtered down to only matches SearchTypeFilter ) // TODO: could we remove this entirely? type SearchState ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/ref_range.go
pkg/gui/types/ref_range.go
package types import "github.com/jesseduffield/lazygit/pkg/commands/models" type RefRange struct { From models.Ref To models.Ref }
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/types/common.go
pkg/gui/types/common.go
package types import ( "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/modes/filtering/filtering.go
pkg/gui/modes/filtering/filtering.go
package filtering type Filtering struct { path string // the filename that gets passed to git log author string // the author that gets passed to git log selectedCommitHash string // the commit that was selected before we entered filtering mode } func New(path string, author string) Filte...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/modes/diffing/diffing.go
pkg/gui/modes/diffing/diffing.go
package diffing // if ref is blank we're not diffing anything type Diffing struct { Ref string Reverse bool } func New() Diffing { return Diffing{} } func (self *Diffing) Active() bool { return self.Ref != "" } // GetFromAndReverseArgsForDiff tells us the from and reverse args to be used in a diff command. ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/modes/marked_base_commit/marked_base_commit.go
pkg/gui/modes/marked_base_commit/marked_base_commit.go
package marked_base_commit type MarkedBaseCommit struct { hash string // the hash of the commit used as a rebase base commit; empty string when unset } func New() MarkedBaseCommit { return MarkedBaseCommit{} } func (m *MarkedBaseCommit) Active() bool { return m.hash != "" } func (m *MarkedBaseCommit) Reset() { ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/modes/cherrypicking/cherry_picking.go
pkg/gui/modes/cherrypicking/cherry_picking.go
package cherrypicking import ( "github.com/jesseduffield/generics/set" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/samber/lo" ) type CherryPicking struct { CherryPickedCommits []*models.Commit // we only allow cherry picking from one context at a time, so you can't copy a commit from // ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/keybindings/keybindings.go
pkg/gui/keybindings/keybindings.go
package keybindings import ( "fmt" "log" "strings" "unicode/utf8" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/constants" "github.com/jesseduffield/lazygit/pkg/gui/types" ) func Label(name string) string { return LabelFromKey(GetKey(nam...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/status/status_manager.go
pkg/gui/status/status_manager.go
package status import ( "time" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/gui/presentation" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/samber/lo" "github.com/sasha-s/go-deadlock" ) // StatusManager's job is to handle q...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/history_trait.go
pkg/gui/context/history_trait.go
package context import ( "github.com/jesseduffield/lazygit/pkg/utils" ) // Maintains a list of strings that have previously been searched/filtered for type SearchHistory struct { history *utils.HistoryBuffer[string] } func NewSearchHistory() *SearchHistory { return &SearchHistory{ history: utils.NewHistoryBuffe...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/main_context.go
pkg/gui/context/main_context.go
package context import ( "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type MainContext struct { *SimpleContext *SearchTrait } var _ types.ISearchableContext = (*MainContext)(nil) func NewMainContext( view *gocui.View, windowName string, key types.ContextKey, c *Context...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/context_common.go
pkg/gui/context/context_common.go
package context import ( "github.com/jesseduffield/lazygit/pkg/common" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type ContextCommon struct { *common.Common types.IGuiCommon }
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/search_trait.go
pkg/gui/context/search_trait.go
package context import ( "fmt" "github.com/jesseduffield/lazygit/pkg/gui/keybindings" "github.com/jesseduffield/lazygit/pkg/theme" ) type SearchTrait struct { c *ContextCommon *SearchHistory searchString string } func NewSearchTrait(c *ContextCommon) *SearchTrait { return &SearchTrait{ c: c, ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/confirmation_context.go
pkg/gui/context/confirmation_context.go
package context import ( "github.com/jesseduffield/lazygit/pkg/gui/types" ) type ConfirmationContext struct { *SimpleContext c *ContextCommon State ConfirmationContextState } type ConfirmationContextState struct { OnConfirm func() error OnClose func() error } var _ types.Context = (*ConfirmationContext)(ni...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/dynamic_title_builder.go
pkg/gui/context/dynamic_title_builder.go
package context import "fmt" type DynamicTitleBuilder struct { formatStr string // e.g. 'remote branches for %s' titleRef string // e.g. 'origin' } func NewDynamicTitleBuilder(formatStr string) *DynamicTitleBuilder { return &DynamicTitleBuilder{ formatStr: formatStr, } } func (self *DynamicTitleBuilder) SetT...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/list_renderer.go
pkg/gui/context/list_renderer.go
package context import ( "strings" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/samber/lo" "golang.org/x/exp/slices" ) type NonModelItem struct { // Where in the model this should be inserted Index int // Content to render Content string // The c...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/list_renderer_test.go
pkg/gui/context/list_renderer_test.go
package context import ( "fmt" "strings" "testing" "github.com/samber/lo" "github.com/stretchr/testify/assert" ) // wrapping string in my own type to give it an ID method which is required for list items type mystring string func (self mystring) ID() string { return string(self) } func TestListRenderer_rende...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/view_trait.go
pkg/gui/context/view_trait.go
package context import ( "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/gui/types" ) const HORIZONTAL_SCROLL_FACTOR = 3 type ViewTrait struct { view *gocui.View } var _ types.IViewTrait = &ViewTrait{} func NewViewTrait(view *gocui.View) *ViewTrait { return &ViewTrait{view: view} } func...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/prompt_context.go
pkg/gui/context/prompt_context.go
package context import ( "github.com/jesseduffield/lazygit/pkg/gui/types" ) type PromptContext struct { *SimpleContext c *ContextCommon State ConfirmationContextState } var _ types.Context = (*PromptContext)(nil) func NewPromptContext( c *ContextCommon, ) *PromptContext { return &PromptContext{ c: c, Sim...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/tags_context.go
pkg/gui/context/tags_context.go
package context import ( "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/presentation" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type TagsContext struct { *FilteredListViewModel[*models.Tag] *ListContextTrait } var ( _ types.IListContext = (*TagsCont...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/working_tree_context.go
pkg/gui/context/working_tree_context.go
package context import ( "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/filetree" "github.com/jesseduffield/lazygit/pkg/gui/presentation" "github.com/jesseduffield/lazygit/pkg/gui/presentation/icons" "github.com/jesseduffield/lazy...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/filtered_list.go
pkg/gui/context/filtered_list.go
package context import ( "strings" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/sahilm/fuzzy" "github.com/samber/lo" "github.com/sasha-s/go-deadlock" ) type FilteredList[T any] struct { filteredIndices []int // if nil, we are not filtering getList func() []T getFilterFields func(T) []s...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/remote_branches_context.go
pkg/gui/context/remote_branches_context.go
package context import ( "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/presentation" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/samber/lo" ) type RemoteBranchesContext struct { *FilteredListViewModel[*models.RemoteBranch] *ListContextTrait *D...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/patch_explorer_context.go
pkg/gui/context/patch_explorer_context.go
package context import ( "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/gui/patch_exploring" "github.com/jesseduffield/lazygit/pkg/gui/types" deadlock "github.com/sasha-s/go-deadlock" ) type PatchExplorerContext struct { *SimpleContext *SearchTrait state *patch_explori...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/local_commits_context.go
pkg/gui/context/local_commits_context.go
package context import ( "fmt" "log" "strings" "time" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/presentation" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/samber/lo" ) type LocalCommitsContext struct { *...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/list_view_model.go
pkg/gui/context/list_view_model.go
package context import ( "github.com/jesseduffield/lazygit/pkg/gui/context/traits" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/samber/lo" ) type HasID interface { ID() string } type ListViewModel[T HasID] struct { *traits.ListCursor getModel func() []T } func NewListViewModel[T HasID](getMode...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/remotes_context.go
pkg/gui/context/remotes_context.go
package context import ( "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/presentation" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type RemotesContext struct { *FilteredListViewModel[*models.Remote] *ListContextTrait } var ( _ types.IListContext = (*Re...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/sub_commits_context.go
pkg/gui/context/sub_commits_context.go
package context import ( "fmt" "time" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/presentation" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/samber...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/commit_message_context.go
pkg/gui/context/commit_message_context.go
package context import ( "os" "path/filepath" "strconv" "strings" "github.com/jesseduffield/lazygit/pkg/gui/keybindings" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/spf13/afero" ) const PreservedCommitMessageFileName = "LAZYGIT_PENDING_COMMIT" ty...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/list_context_trait.go
pkg/gui/context/list_context_trait.go
package context import ( "fmt" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type ListContextTrait struct { types.Context ListRenderer c *ContextCommon // Some contexts, like the commit context, will highlight the path from the selected commit // to its parents, because it's ambiguous otherwise. For the...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/menu_context.go
pkg/gui/context/menu_context.go
package context import ( "errors" "strings" "github.com/jesseduffield/lazygit/pkg/gui/keybindings" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/i18n" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/samber/lo" )...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/simple_context.go
pkg/gui/context/simple_context.go
package context import ( "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type SimpleContext struct { *BaseContext handleRenderFunc func() } func NewSimpleContext(baseContext *BaseContext) *SimpleContext { return &SimpleContext{ BaseContext: baseContext, } } var _ types.Co...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/setup.go
pkg/gui/context/setup.go
package context import "github.com/jesseduffield/lazygit/pkg/gui/types" func NewContextTree(c *ContextCommon) *ContextTree { commitFilesContext := NewCommitFilesContext(c) return &ContextTree{ Global: NewSimpleContext( NewBaseContext(NewBaseContextOpts{ Kind: types.GLOBAL_CONTEXT, Vie...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/merge_conflicts_context.go
pkg/gui/context/merge_conflicts_context.go
package context import ( "math" "github.com/jesseduffield/lazygit/pkg/gui/mergeconflicts" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/sasha-s/go-deadlock" ) type MergeConflictsContext struct { types.Context viewModel *ConflictsViewModel c *ContextCommon mutex deadlock.Mutex } ty...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/submodules_context.go
pkg/gui/context/submodules_context.go
package context import ( "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/presentation" "github.com/jesseduffield/lazygit/pkg/gui/types" ) type SubmodulesContext struct { *FilteredListViewModel[*models.SubmoduleConfig] *ListContextTrait } var _ types.IListContext ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false
jesseduffield/lazygit
https://github.com/jesseduffield/lazygit/blob/80dd695d7a8d32714603f5a6307f26f589802b1d/pkg/gui/context/context.go
pkg/gui/context/context.go
package context import ( "github.com/jesseduffield/lazygit/pkg/gui/types" ) const ( // used as a nil value when passing a context key as an arg NO_CONTEXT types.ContextKey = "none" GLOBAL_CONTEXT_KEY types.ContextKey = "global" STATUS_CONTEXT_KEY types.ContextKey = "status" ...
go
MIT
80dd695d7a8d32714603f5a6307f26f589802b1d
2026-01-07T08:35:43.445894Z
false