├── pkg ├── commands │ ├── testdata │ │ ├── a_file │ │ └── a_dir │ │ │ └── file │ ├── oscommands │ │ ├── os_windows.go │ │ ├── os_default_platform.go │ │ └── cmd_obj_runner_default.go │ ├── models │ │ ├── author.go │ │ ├── remote.go │ │ ├── stash_entry.go │ │ ├── commit_file.go │ │ ├── remote_branch.go │ │ └── tag.go │ ├── git_commands │ │ └── custom.go │ ├── types │ │ └── enums │ │ │ └── enums.go │ ├── git_config │ │ └── fake_git_config.go │ └── patch │ │ └── patch_line.go ├── integration │ └── tests │ │ ├── shared │ │ └── README.md │ │ ├── branch │ │ ├── open_with_cli_arg.go │ │ └── open_pull_request_no_upstream.go │ │ ├── filter_by_path │ │ └── cli_arg.go │ │ ├── demo │ │ └── shared.go │ │ ├── status │ │ └── click_repo_name_to_open_repos_menu.go │ │ ├── misc │ │ ├── initial_open.go │ │ └── confirm_on_quit.go │ │ ├── ui │ │ ├── switch_tab_from_menu.go │ │ └── open_link_failure.go │ │ └── config │ │ └── remote_named_star.go ├── gui │ ├── types │ │ ├── ref.go │ │ ├── common_commands.go │ │ ├── suggestion.go │ │ ├── modes.go │ │ └── search_state.go │ ├── context │ │ ├── context_common.go │ │ ├── history_trait.go │ │ ├── dynamic_title_builder.go │ │ └── parent_context_mgr.go │ ├── pty_windows.go │ ├── controllers │ │ ├── common.go │ │ ├── helpers │ │ │ ├── amend_helper.go │ │ │ ├── view_helper.go │ │ │ └── upstream_helper_test.go │ │ ├── types.go │ │ ├── attach.go │ │ └── base_controller.go │ ├── presentation │ │ ├── suggestions.go │ │ ├── icons │ │ │ └── icons.go │ │ ├── item_operations.go │ │ └── submodules.go │ ├── modes │ │ ├── marked_base_commit │ │ │ └── marked_base_commit.go │ │ └── diffing │ │ │ └── diffing.go │ ├── filetree │ │ └── commit_file_node.go │ └── style │ │ └── color.go ├── config │ ├── config_windows.go │ ├── config_default_platform.go │ └── dummies.go ├── cheatsheet │ └── generator.go ├── jsonschema │ └── generator.go ├── utils │ ├── regexp.go │ ├── errors.go │ ├── io.go │ ├── once_writer_test.go │ ├── string_stack.go │ └── once_writer.go ├── env │ └── env.go ├── logs │ └── tail │ │ ├── logs_default.go │ │ └── tail.go └── common │ └── common.go ├── test ├── .gitconfig ├── README.md ├── global_git_config └── files │ └── pre-push ├── vendor ├── github.com │ ├── mgutz │ │ └── str │ │ │ ├── VERSION │ │ │ ├── .gitignore │ │ │ ├── CREDITS │ │ │ └── doc.go │ ├── kevinburke │ │ └── ssh_config │ │ │ ├── .gitignore │ │ │ ├── .gitattributes │ │ │ ├── AUTHORS.txt │ │ │ ├── Makefile │ │ │ └── position.go │ ├── go-logfmt │ │ └── logfmt │ │ │ ├── .gitignore │ │ │ └── doc.go │ ├── jesseduffield │ │ ├── gocui │ │ │ └── .gitignore │ │ ├── go-git │ │ │ └── v5 │ │ │ │ ├── .gitignore │ │ │ │ ├── plumbing │ │ │ │ ├── storer │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── index.go │ │ │ │ │ ├── shallow.go │ │ │ │ │ └── storer.go │ │ │ │ ├── format │ │ │ │ │ ├── objfile │ │ │ │ │ │ └── doc.go │ │ │ │ │ └── packfile │ │ │ │ │ │ └── error.go │ │ │ │ ├── object │ │ │ │ │ └── common.go │ │ │ │ ├── revision.go │ │ │ │ └── error.go │ │ │ │ ├── internal │ │ │ │ └── revision │ │ │ │ │ └── token.go │ │ │ │ ├── doc.go │ │ │ │ ├── storage │ │ │ │ └── filesystem │ │ │ │ │ ├── module.go │ │ │ │ │ └── deltaobject.go │ │ │ │ ├── common.go │ │ │ │ ├── worktree_linux.go │ │ │ │ ├── worktree_bsd.go │ │ │ │ ├── worktree_unix_other.go │ │ │ │ └── worktree_plan9.go │ │ ├── minimal │ │ │ └── gitignore │ │ │ │ └── testgitignore │ │ └── kill │ │ │ └── README.md │ ├── mitchellh │ │ ├── go-ps │ │ │ └── .gitignore │ │ └── go-homedir │ │ │ └── README.md │ ├── spkg │ │ └── bom │ │ │ ├── .gitignore │ │ │ ├── discard_go15.go │ │ │ └── discard_go14.go │ ├── gdamore │ │ ├── tcell │ │ │ └── v2 │ │ │ │ ├── .gitignore │ │ │ │ ├── terminfo │ │ │ │ ├── .gitignore │ │ │ │ ├── TERMINALS.md │ │ │ │ ├── gen.sh │ │ │ │ └── models.txt │ │ │ │ ├── AUTHORS │ │ │ │ ├── SECURITY.md │ │ │ │ ├── charset_stub.go │ │ │ │ └── charset_windows.go │ │ └── encoding │ │ │ ├── SECURITY.md │ │ │ └── doc.go │ ├── sanity-io │ │ └── litter │ │ │ ├── .gitignore │ │ │ └── CHANGELOG.md │ ├── wk8 │ │ └── go-ordered-map │ │ │ └── v2 │ │ │ ├── .gitignore │ │ │ └── Makefile │ ├── aybabtme │ │ └── humanlog │ │ │ ├── .gitignore │ │ │ └── goreleaser.yaml │ ├── sahilm │ │ └── fuzzy │ │ │ ├── .gitignore │ │ │ ├── Gopkg.toml │ │ │ ├── CONTRIBUTING.md │ │ │ └── Gopkg.lock │ ├── sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── terminal_check_appengine.go │ │ │ ├── terminal_check_no_terminal.go │ │ │ ├── terminal_check_unix.go │ │ │ ├── terminal_check_solaris.go │ │ │ ├── terminal_check_bsd.go │ │ │ ├── terminal_check_notappengine.go │ │ │ ├── appveyor.yml │ │ │ ├── doc.go │ │ │ └── terminal_check_windows.go │ ├── kr │ │ └── logfmt │ │ │ └── .gitignore │ ├── kyokomi │ │ └── emoji │ │ │ └── v2 │ │ │ └── .gitignore │ ├── karimkhaleel │ │ └── jsonschema │ │ │ └── .gitignore │ ├── spf13 │ │ └── afero │ │ │ ├── .gitignore │ │ │ └── appveyor.yml │ ├── creack │ │ └── pty │ │ │ ├── .gitignore │ │ │ ├── ztypes_386.go │ │ │ ├── ztypes_amd64.go │ │ │ ├── ztypes_arm.go │ │ │ ├── ztypes_arm64.go │ │ │ ├── ztypes_ppc64.go │ │ │ ├── ztypes_s390x.go │ │ │ ├── ztypes_ppc64le.go │ │ │ ├── ztypes_riscvx.go │ │ │ ├── pty_unsupported.go │ │ │ ├── ztypes_mipsx.go │ │ │ ├── ztypes_freebsd_386.go │ │ │ ├── ztypes_freebsd_arm.go │ │ │ ├── ztypes_openbsd_32bit_int.go │ │ │ ├── ztypes_freebsd_arm64.go │ │ │ ├── ioctl.go │ │ │ ├── ztypes_freebsd_amd64.go │ │ │ ├── ztypes_dragonfly_amd64.go │ │ │ ├── doc.go │ │ │ ├── mktypes.bash │ │ │ ├── Dockerfile.riscv │ │ │ └── ioctl_solaris.go │ ├── petermattis │ │ └── goid │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── runtime_gccgo_go1.8.go │ │ │ ├── goid_go1.4.s │ │ │ ├── runtime_go1.9.go │ │ │ ├── goid_go1.5_amd64.go │ │ │ ├── goid_go1.3.go │ │ │ └── goid_go1.3.c │ ├── go-git │ │ ├── go-billy │ │ │ └── v5 │ │ │ │ ├── .gitignore │ │ │ │ └── osfs │ │ │ │ └── os_posix.go │ │ └── gcfg │ │ │ ├── go1_0.go │ │ │ ├── types │ │ │ ├── doc.go │ │ │ ├── bool.go │ │ │ └── scan.go │ │ │ ├── go1_2.go │ │ │ └── README │ ├── mattn │ │ ├── go-isatty │ │ │ ├── doc.go │ │ │ ├── go.test.sh │ │ │ ├── isatty_others.go │ │ │ ├── isatty_tcgets.go │ │ │ ├── isatty_plan9.go │ │ │ ├── isatty_bsd.go │ │ │ └── isatty_solaris.go │ │ ├── go-runewidth │ │ │ ├── runewidth_appengine.go │ │ │ ├── runewidth_js.go │ │ │ └── runewidth_windows.go │ │ └── go-colorable │ │ │ └── go.test.sh │ ├── gobwas │ │ └── glob │ │ │ ├── .gitignore │ │ │ ├── syntax │ │ │ └── syntax.go │ │ │ ├── match │ │ │ ├── nothing.go │ │ │ ├── super.go │ │ │ └── suffix.go │ │ │ ├── bench.sh │ │ │ └── util │ │ │ └── strings │ │ │ └── strings.go │ ├── integrii │ │ └── flaggy │ │ │ ├── logo.png │ │ │ ├── .gitignore │ │ │ └── positionalValue.go │ ├── xo │ │ └── terminfo │ │ │ └── .gitignore │ ├── samber │ │ └── lo │ │ │ ├── Dockerfile │ │ │ ├── constraints.go │ │ │ ├── docker-compose.yml │ │ │ ├── func.go │ │ │ └── test.go │ ├── buger │ │ └── jsonparser │ │ │ ├── .gitignore │ │ │ ├── Dockerfile │ │ │ └── bytes_safe.go │ ├── kardianos │ │ └── osext │ │ │ ├── osext_go18.go │ │ │ ├── osext_plan9.go │ │ │ └── README.md │ ├── sasha-s │ │ └── go-deadlock │ │ │ ├── deadlock_map.go │ │ │ └── test.sh │ ├── adrg │ │ └── xdg │ │ │ ├── codecov.yml │ │ │ └── internal │ │ │ └── pathutil │ │ │ └── pathutil_plan9.go │ ├── stretchr │ │ └── testify │ │ │ └── assert │ │ │ ├── assertion_format.go.tmpl │ │ │ ├── assertion_forward.go.tmpl │ │ │ ├── errors.go │ │ │ ├── assertion_compare_legacy.go │ │ │ ├── assertion_compare_can_convert.go │ │ │ └── forward_assertions.go │ ├── konsorten │ │ └── go-windows-terminal-sequences │ │ │ └── sequences_dummy.go │ ├── bahlo │ │ └── generic-list-go │ │ │ └── README.md │ ├── gookit │ │ └── color │ │ │ └── .gitignore │ ├── xanzy │ │ └── ssh-agent │ │ │ └── .gitignore │ ├── sergi │ │ └── go-diff │ │ │ └── diffmatchpatch │ │ │ ├── operation_string.go │ │ │ └── mathutil.go │ ├── cloudfoundry │ │ └── jibber_jabber │ │ │ └── jibber_jabber.go │ ├── emirpasic │ │ └── gods │ │ │ ├── containers │ │ │ └── serialization.go │ │ │ └── trees │ │ │ └── binaryheap │ │ │ └── serialization.go │ ├── atotto │ │ └── clipboard │ │ │ └── clipboard.go │ ├── imdario │ │ └── mergo │ │ │ └── .gitignore │ └── davecgh │ │ └── go-spew │ │ └── LICENSE ├── golang.org │ └── x │ │ ├── sys │ │ ├── unix │ │ │ ├── .gitignore │ │ │ ├── ptrace_ios.go │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ ├── endian_big.go │ │ │ ├── ptrace_darwin.go │ │ │ ├── constants.go │ │ │ ├── endian_little.go │ │ │ ├── mmap_nomremap.go │ │ │ ├── aliases.go │ │ │ ├── readdirent_getdents.go │ │ │ ├── pagesize_unix.go │ │ │ ├── sysvshm_unix_other.go │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── syscall_linux_gc_arm.go │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── fcntl_linux_32bit.go │ │ │ ├── syscall_linux_alarm.go │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── syscall_linux_gc.go │ │ │ ├── syscall_hurd_386.go │ │ │ ├── sysvshm_linux.go │ │ │ ├── sockcmsg_dragonfly.go │ │ │ ├── race0.go │ │ │ ├── syscall_linux_gc_386.go │ │ │ ├── syscall_linux_gccgo_arm.go │ │ │ ├── syscall_unix_gc.go │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── race.go │ │ │ ├── syscall_hurd.go │ │ │ ├── env_unix.go │ │ │ ├── asm_bsd_arm.s │ │ │ ├── readdirent_getdirentries.go │ │ │ ├── zptrace_linux_arm64.go │ │ │ ├── asm_openbsd_mips64.s │ │ │ ├── asm_bsd_386.s │ │ │ ├── asm_bsd_arm64.s │ │ │ ├── asm_bsd_riscv64.s │ │ │ ├── asm_bsd_amd64.s │ │ │ ├── asm_bsd_ppc64.s │ │ │ ├── bluetooth_linux.go │ │ │ ├── dev_aix_ppc.go │ │ │ └── dev_darwin.go │ │ ├── plan9 │ │ │ ├── asm.s │ │ │ ├── pwd_go15_plan9.go │ │ │ ├── pwd_plan9.go │ │ │ ├── race0.go │ │ │ ├── mksysnum_plan9.sh │ │ │ ├── str.go │ │ │ ├── env_plan9.go │ │ │ ├── race.go │ │ │ ├── asm_plan9_arm.s │ │ │ ├── asm_plan9_386.s │ │ │ └── asm_plan9_amd64.s │ │ ├── cpu │ │ │ ├── cpu_other_arm.go │ │ │ ├── cpu_zos.go │ │ │ ├── cpu_other_arm64.go │ │ │ ├── cpu_riscv64.go │ │ │ ├── cpu_loong64.go │ │ │ ├── cpu_mipsx.go │ │ │ ├── cpu_other_riscv64.go │ │ │ ├── cpu_other_mips64x.go │ │ │ ├── cpu_linux_noinit.go │ │ │ ├── cpu_gc_arm64.go │ │ │ ├── cpu_other_ppc64x.go │ │ │ ├── cpu_gccgo_arm64.go │ │ │ ├── cpu_linux.go │ │ │ ├── cpu_mips64x.go │ │ │ ├── cpu_openbsd_arm64.s │ │ │ ├── cpu_ppc64x.go │ │ │ ├── endian_big.go │ │ │ ├── runtime_auxv_go121.go │ │ │ ├── runtime_auxv.go │ │ │ ├── endian_little.go │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── cpu_wasm.go │ │ │ ├── cpu_gc_x86.go │ │ │ ├── cpu_linux_mips64x.go │ │ │ ├── cpu_x86.s │ │ │ ├── cpu_aix.go │ │ │ ├── cpu_zos_s390x.go │ │ │ ├── cpu_gc_s390x.go │ │ │ └── syscall_aix_gccgo.go │ │ └── windows │ │ │ ├── aliases.go │ │ │ ├── mksyscall.go │ │ │ ├── race0.go │ │ │ ├── str.go │ │ │ └── race.go │ │ ├── term │ │ ├── codereview.cfg │ │ ├── term_unix_other.go │ │ ├── term_unix_bsd.go │ │ └── README.md │ │ ├── crypto │ │ ├── curve25519 │ │ │ └── internal │ │ │ │ └── field │ │ │ │ ├── sync.checkpoint │ │ │ │ ├── README │ │ │ │ ├── fe_arm64_noasm.go │ │ │ │ ├── fe_amd64_noasm.go │ │ │ │ ├── fe_arm64.go │ │ │ │ ├── fe_amd64.go │ │ │ │ └── sync.sh │ │ ├── internal │ │ │ └── poly1305 │ │ │ │ ├── mac_noasm.go │ │ │ │ └── bits_go1.13.go │ │ └── chacha20 │ │ │ ├── chacha_noasm.go │ │ │ ├── chacha_ppc64le.go │ │ │ └── chacha_arm64.go │ │ ├── exp │ │ ├── AUTHORS │ │ └── CONTRIBUTORS │ │ ├── sync │ │ └── errgroup │ │ │ ├── go120.go │ │ │ └── pre_go120.go │ │ └── net │ │ └── context │ │ └── go19.go └── gopkg.in │ ├── ozeidan │ └── fuzzy-patricia.v3 │ │ └── AUTHORS │ └── yaml.v3 │ └── NOTICE ├── .vscode ├── debugger_config.yml └── settings.json ├── .editorconfig ├── scripts ├── record_demo.sh ├── bump_modules.sh ├── bump_lazycore.sh ├── bump_gocui.sh ├── check_filenames.sh └── check_for_fixups.sh ├── .gitattributes ├── demo └── README.md ├── docs ├── dev │ ├── Integration_Tests.md │ └── README.md └── README.md ├── CODE-OF-CONDUCT.md ├── .github ├── FUNDING.yml ├── dependabot.yml ├── ISSUE_TEMPLATE │ └── discussion.md └── release.yml ├── main.go ├── cmd └── i18n │ └── main.go ├── Dockerfile ├── .gitignore └── .devcontainer └── Dockerfile /pkg/commands/testdata/a_file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pkg/commands/testdata/a_dir/file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/.gitconfig: -------------------------------------------------------------------------------- 1 | global_git_config -------------------------------------------------------------------------------- /vendor/github.com/mgutz/str/VERSION: -------------------------------------------------------------------------------- 1 | 1.1.0 2 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/debugger_config.yml: -------------------------------------------------------------------------------- 1 | disableStartupPopups: true 2 | -------------------------------------------------------------------------------- /vendor/github.com/go-logfmt/logfmt/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/gocui/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-ps/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant/ 2 | -------------------------------------------------------------------------------- /vendor/github.com/spkg/bom/.gitignore: -------------------------------------------------------------------------------- 1 | coverage.out 2 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/v2/.gitignore: -------------------------------------------------------------------------------- 1 | coverage.txt 2 | -------------------------------------------------------------------------------- /vendor/github.com/sanity-io/litter/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /vendor/github.com/wk8/go-ordered-map/v2/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*.go] 4 | indent_style = tab 5 | -------------------------------------------------------------------------------- /vendor/github.com/aybabtme/humanlog/.gitignore: -------------------------------------------------------------------------------- 1 | *.ignore 2 | dist 3 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/v2/terminfo/.gitignore: -------------------------------------------------------------------------------- 1 | mkinfo 2 | -------------------------------------------------------------------------------- /vendor/github.com/sahilm/fuzzy/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | coverage/ 3 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | vendor 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /scripts/record_demo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | demo/record_demo.sh "$@" 4 | -------------------------------------------------------------------------------- /vendor/github.com/kr/logfmt/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | *.swp 3 | *.prof 4 | -------------------------------------------------------------------------------- /vendor/github.com/kyokomi/emoji/v2/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | emoji.iml 3 | -------------------------------------------------------------------------------- /vendor/github.com/karimkhaleel/jsonschema/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | .idea/ 3 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/.gitignore: -------------------------------------------------------------------------------- 1 | sftpfs/file1 2 | sftpfs/test/ 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.go text 2 | *.md text eol=lf 3 | *.json text eol=lf 4 | -------------------------------------------------------------------------------- /demo/README.md: -------------------------------------------------------------------------------- 1 | This directory contains stuff for recording lazygit demos. 2 | 3 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/.gitignore: -------------------------------------------------------------------------------- 1 | [568].out 2 | _go* 3 | _test* 4 | _obj 5 | -------------------------------------------------------------------------------- /docs/dev/Integration_Tests.md: -------------------------------------------------------------------------------- 1 | see new docs [here](../../pkg/integration/README.md) 2 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/.gitattributes: -------------------------------------------------------------------------------- 1 | testdata/dos-lines eol=crlf 2 | -------------------------------------------------------------------------------- /vendor/github.com/petermattis/goid/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.test 3 | .*.swp 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /scripts/bump_modules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | GO111MODULE=on 4 | mv go.mod /tmp/ 5 | go mod init -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "gopls": { 3 | "formatting.gofumpt": true, 4 | }, 5 | } 6 | -------------------------------------------------------------------------------- /CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Lazygit Code of Conduct 2 | 3 | Be nice, or face the wrath of the maintainer. 4 | -------------------------------------------------------------------------------- /vendor/github.com/go-git/go-billy/v5/.gitignore: -------------------------------------------------------------------------------- 1 | /coverage.txt 2 | /vendor 3 | Gopkg.lock 4 | Gopkg.toml 5 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/.gitignore: -------------------------------------------------------------------------------- 1 | coverage.out 2 | *~ 3 | coverage.txt 4 | profile.out 5 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint: -------------------------------------------------------------------------------- 1 | b0c49ae9f59d233526f8934262c5bbbe14d4358d 2 | -------------------------------------------------------------------------------- /vendor/github.com/gobwas/glob/.gitignore: -------------------------------------------------------------------------------- 1 | glob.iml 2 | .idea 3 | *.cpu 4 | *.mem 5 | *.test 6 | *.dot 7 | *.png 8 | *.svg 9 | -------------------------------------------------------------------------------- /vendor/github.com/integrii/flaggy/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottmckendry/lazygit/master/vendor/github.com/integrii/flaggy/logo.png -------------------------------------------------------------------------------- /vendor/github.com/mgutz/str/.gitignore: -------------------------------------------------------------------------------- 1 | tmp/ 2 | *.log 3 | _* 4 | node_modules 5 | example/dist 6 | /Gododir/godobin* 7 | /Gododir/Gododir 8 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [jesseduffield] 4 | custom: ['https://donorbox.org/lazygit'] 5 | -------------------------------------------------------------------------------- /vendor/github.com/sahilm/fuzzy/Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Test dependency 2 | [[constraint]] 3 | branch = "master" 4 | name = "github.com/kylelemons/godebug" 5 | -------------------------------------------------------------------------------- /pkg/integration/tests/shared/README.md: -------------------------------------------------------------------------------- 1 | This package contains shared helper functions for tests. It is not intended to contain any actual tests itself. 2 | -------------------------------------------------------------------------------- /vendor/gopkg.in/ozeidan/fuzzy-patricia.v3/AUTHORS: -------------------------------------------------------------------------------- 1 | This is the complete list of go-patricia copyright holders: 2 | 3 | Ondřej Kupka 4 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/plumbing/storer/doc.go: -------------------------------------------------------------------------------- 1 | // Package storer defines the interfaces to store objects, references, etc. 2 | package storer 3 | -------------------------------------------------------------------------------- /vendor/github.com/xo/terminfo/.gitignore: -------------------------------------------------------------------------------- 1 | /.cache/ 2 | 3 | /cmd/infocmp/infocmp 4 | /cmd/infocmp/.out/ 5 | 6 | /infocmp 7 | /.out/ 8 | 9 | *.txt 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-git/gcfg/go1_0.go: -------------------------------------------------------------------------------- 1 | // +build !go1.2 2 | 3 | package gcfg 4 | 5 | type textUnmarshaler interface { 6 | UnmarshalText(text []byte) error 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/plumbing/format/objfile/doc.go: -------------------------------------------------------------------------------- 1 | // Package objfile implements encoding and decoding of object files. 2 | package objfile 3 | -------------------------------------------------------------------------------- /vendor/github.com/sahilm/fuzzy/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Everyone is welcome to contribute. Please send me a pull request or file an issue. I promise to respond promptly. 2 | -------------------------------------------------------------------------------- /vendor/github.com/samber/lo/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM golang:1.18 3 | 4 | WORKDIR /go/src/github.com/samber/lo 5 | 6 | COPY Makefile go.* ./ 7 | 8 | RUN make tools 9 | -------------------------------------------------------------------------------- /pkg/gui/types/ref.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type Ref interface { 4 | FullRefName() string 5 | RefName() string 6 | ParentRefName() string 7 | Description() string 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/go-git/gcfg/types/doc.go: -------------------------------------------------------------------------------- 1 | // Package types defines helpers for type conversions. 2 | // 3 | // The API for this package is not finalized yet. 4 | package types 5 | -------------------------------------------------------------------------------- /vendor/github.com/buger/jsonparser/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.test 3 | 4 | *.out 5 | 6 | *.mprof 7 | 8 | .idea 9 | 10 | vendor/github.com/buger/goterm/ 11 | prof.cpu 12 | prof.mem 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-git/gcfg/go1_2.go: -------------------------------------------------------------------------------- 1 | // +build go1.2 2 | 3 | package gcfg 4 | 5 | import ( 6 | "encoding" 7 | ) 8 | 9 | type textUnmarshaler encoding.TextUnmarshaler 10 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/minimal/gitignore/testgitignore: -------------------------------------------------------------------------------- 1 | testgitignore 2 | *.o 3 | 4 | *.out* 5 | #*.ou 6 | aa 7 | bbb 8 | ccc/ 9 | **/Makefile 10 | /testfs/ignoredfile* 11 | -------------------------------------------------------------------------------- /vendor/github.com/samber/lo/constraints.go: -------------------------------------------------------------------------------- 1 | package lo 2 | 3 | // Clonable defines a constraint of types having Clone() T method. 4 | type Clonable[T any] interface { 5 | Clone() T 6 | } 7 | -------------------------------------------------------------------------------- /pkg/gui/types/common_commands.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type CheckoutRefOptions struct { 4 | WaitingStatus string 5 | EnvVars []string 6 | OnRefNotFound func(ref string) error 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/kill/README.md: -------------------------------------------------------------------------------- 1 | # Kill 2 | 3 | Go package for killing processes across different platforms. Handles killing children of processes as well as the process itself. 4 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | package pty 5 | 6 | type ( 7 | _C_int int32 8 | _C_uint uint32 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | package pty 5 | 6 | type ( 7 | _C_int int32 8 | _C_uint uint32 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | package pty 5 | 6 | type ( 7 | _C_int int32 8 | _C_uint uint32 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-git/gcfg/README: -------------------------------------------------------------------------------- 1 | Gcfg reads INI-style configuration files into Go structs; 2 | supports user-defined types and subsections. 3 | 4 | Package docs: https://godoc.org/gopkg.in/gcfg.v1 5 | -------------------------------------------------------------------------------- /vendor/github.com/kardianos/osext/osext_go18.go: -------------------------------------------------------------------------------- 1 | //+build go1.8,!openbsd 2 | 3 | package osext 4 | 5 | import "os" 6 | 7 | func executable() (string, error) { 8 | return os.Executable() 9 | } 10 | -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- 1 | This directory contains some files used by out integration tests. The tests themselves live in [/pkg/integration/](/pkg/integration/). See [here](/pkg/integration/README.md) for more info 2 | 3 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/v2/AUTHORS: -------------------------------------------------------------------------------- 1 | Garrett D'Amore 2 | Zachary Yedidia 3 | Junegunn Choi 4 | Staysail Systems, Inc. 5 | -------------------------------------------------------------------------------- /vendor/github.com/sasha-s/go-deadlock/deadlock_map.go: -------------------------------------------------------------------------------- 1 | // +build go1.9 2 | 3 | package deadlock 4 | 5 | import "sync" 6 | 7 | // Map is sync.Map wrapper 8 | type Map struct { 9 | sync.Map 10 | } 11 | -------------------------------------------------------------------------------- /pkg/commands/oscommands/os_windows.go: -------------------------------------------------------------------------------- 1 | package oscommands 2 | 3 | func GetPlatform() *Platform { 4 | return &Platform{ 5 | OS: "windows", 6 | Shell: "cmd", 7 | ShellArg: "/c", 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/mgutz/str/CREDITS: -------------------------------------------------------------------------------- 1 | * [string.js](http://stringjs.com) - I contributed several 2 | functions to this project. 3 | 4 | * [bbgen.net](http://bbgen.net/blog/2011/06/string-to-argc-argv/) 5 | 6 | -------------------------------------------------------------------------------- /vendor/golang.org/x/exp/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/exp/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_arm64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | // +build arm64 5 | 6 | package pty 7 | 8 | type ( 9 | _C_int int32 10 | _C_uint uint32 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_ppc64.go: -------------------------------------------------------------------------------- 1 | // +build ppc64 2 | 3 | // Created by cgo -godefs - DO NOT EDIT 4 | // cgo -godefs types.go 5 | 6 | package pty 7 | 8 | type ( 9 | _C_int int32 10 | _C_uint uint32 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_s390x.go: -------------------------------------------------------------------------------- 1 | // +build s390x 2 | 3 | // Created by cgo -godefs - DO NOT EDIT 4 | // cgo -godefs types.go 5 | 6 | package pty 7 | 8 | type ( 9 | _C_int int32 10 | _C_uint uint32 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go: -------------------------------------------------------------------------------- 1 | // +build js nacl plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_ppc64le.go: -------------------------------------------------------------------------------- 1 | // +build ppc64le 2 | 3 | // Created by cgo -godefs - DO NOT EDIT 4 | // cgo -godefs types.go 5 | 6 | package pty 7 | 8 | type ( 9 | _C_int int32 10 | _C_uint uint32 11 | ) 12 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "gomod" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | allowed_updates: 8 | - match: 9 | update_type: "security" 10 | -------------------------------------------------------------------------------- /vendor/github.com/spkg/bom/discard_go15.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | package bom 4 | 5 | import "bufio" 6 | 7 | func discardBytes(buf *bufio.Reader, n int) { 8 | // the Discard method was introduced in Go 1.5 9 | buf.Discard(n) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_riscvx.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs types.go 3 | 4 | // +build riscv riscv64 5 | 6 | package pty 7 | 8 | type ( 9 | _C_int int32 10 | _C_uint uint32 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | Eugene Terentev 2 | Kevin Burke 3 | Mark Nevill 4 | Sergey Lukjanov 5 | Wayne Ashley Berry 6 | -------------------------------------------------------------------------------- /vendor/github.com/adrg/xdg/codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | target: 90% 6 | threshold: 1% 7 | patch: 8 | default: 9 | target: 100% 10 | ignore: 11 | - "paths_plan9.go" 12 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/plumbing/object/common.go: -------------------------------------------------------------------------------- 1 | package object 2 | 3 | import ( 4 | "bufio" 5 | "sync" 6 | ) 7 | 8 | var bufPool = sync.Pool{ 9 | New: func() interface{} { 10 | return bufio.NewReader(nil) 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_appengine.go: -------------------------------------------------------------------------------- 1 | //go:build appengine 2 | // +build appengine 3 | 4 | package runewidth 5 | 6 | // IsEastAsian return true if the current locale is CJK 7 | func IsEastAsian() bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentFormat}} 2 | func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { 3 | if h, ok := t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | if h, ok := a.t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/pty_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!darwin,!freebsd,!dragonfly,!openbsd,!solaris 2 | 3 | package pty 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | func open() (pty, tty *os.File, err error) { 10 | return nil, nil, ErrUnsupported 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_mipsx.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | // +build linux 5 | // +build mips mipsle mips64 mips64le 6 | 7 | package pty 8 | 9 | type ( 10 | _C_int int32 11 | _C_uint uint32 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/github.com/sanity-io/litter/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 1.1.0 (2017-11-1) 2 | 3 | A slight breaking change. The dump-method of the `Dumper` interface has changed from `Dump` to `LitterDump` to mitigate potential collisions. 4 | 5 | # 1.0.0 (2017-10-29) 6 | 7 | Tagged 1.0.0. 8 | -------------------------------------------------------------------------------- /pkg/gui/context/context_common.go: -------------------------------------------------------------------------------- 1 | package context 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/common" 5 | "github.com/jesseduffield/lazygit/pkg/gui/types" 6 | ) 7 | 8 | type ContextCommon struct { 9 | *common.Common 10 | types.IGuiCommon 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/samber/lo/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | dev: 5 | image: golang:1.18-bullseye 6 | volumes: 7 | - ./:/go/src/github.com/samber/lo 8 | working_dir: /go/src/github.com/samber/lo 9 | command: make watch-test 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·use(SB),NOSPLIT,$0 8 | RET 9 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_freebsd_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package pty 5 | 6 | const ( 7 | _C_SPECNAMELEN = 0x3f 8 | ) 9 | 10 | type fiodgnameArg struct { 11 | Len int32 12 | Buf *byte 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_freebsd_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package pty 5 | 6 | const ( 7 | _C_SPECNAMELEN = 0x3f 8 | ) 9 | 10 | type fiodgnameArg struct { 11 | Len int32 12 | Buf *byte 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_openbsd_32bit_int.go: -------------------------------------------------------------------------------- 1 | // +build openbsd 2 | // +build 386 amd64 arm arm64 3 | 4 | package pty 5 | 6 | type ptmget struct { 7 | Cfd int32 8 | Sfd int32 9 | Cn [16]int8 10 | Sn [16]int8 11 | } 12 | 13 | var ioctl_PTMGET = 0x40287401 14 | -------------------------------------------------------------------------------- /pkg/commands/models/author.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import "fmt" 4 | 5 | // A commit author 6 | type Author struct { 7 | Name string 8 | Email string 9 | } 10 | 11 | func (self *Author) Combined() string { 12 | return fmt.Sprintf("%s <%s>", self.Name, self.Email) 13 | } 14 | -------------------------------------------------------------------------------- /pkg/config/config_windows.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | // GetPlatformDefaultConfig gets the defaults for the platform 4 | func GetPlatformDefaultConfig() OSConfig { 5 | return OSConfig{ 6 | Open: `start "" {{filename}}`, 7 | OpenLink: `start "" {{link}}`, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/samber/lo/func.go: -------------------------------------------------------------------------------- 1 | package lo 2 | 3 | // Partial returns new function that, when called, has its first argument set to the provided value. 4 | func Partial[T1, T2, R any](f func(T1, T2) R, arg1 T1) func(T2) R { 5 | return func(t2 T2) R { 6 | return f(arg1, t2) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_freebsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs types_freebsd.go 3 | 4 | package pty 5 | 6 | const ( 7 | _C_SPECNAMELEN = 0xff 8 | ) 9 | 10 | type fiodgnameArg struct { 11 | Len int32 12 | Buf *byte 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ioctl.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!solaris 2 | 3 | package pty 4 | 5 | import "syscall" 6 | 7 | func ioctl(fd, cmd, ptr uintptr) error { 8 | _, _, e := syscall.Syscall(syscall.SYS_IOCTL, fd, cmd, ptr) 9 | if e != 0 { 10 | return e 11 | } 12 | return nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_js.go: -------------------------------------------------------------------------------- 1 | //go:build js && !appengine 2 | // +build js,!appengine 3 | 4 | package runewidth 5 | 6 | func IsEastAsian() bool { 7 | // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && arm 6 | 7 | package cpu 8 | 9 | func archInit() {} 10 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/sequences_dummy.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin 2 | 3 | package sequences 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | func EnableVirtualTerminalProcessing(stream uintptr, enable bool) error { 10 | return fmt.Errorf("windows only package") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/spkg/bom/discard_go14.go: -------------------------------------------------------------------------------- 1 | // +build !go1.5 2 | 3 | package bom 4 | 5 | import "bufio" 6 | 7 | func discardBytes(buf *bufio.Reader, n int) { 8 | // cannot use the buf.Discard method as it was introduced in Go 1.5 9 | for i := 0; i < n; i++ { 10 | buf.ReadByte() 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | func archInit() { 8 | doinit() 9 | Initialized = true 10 | } 11 | -------------------------------------------------------------------------------- /pkg/cheatsheet/generator.go: -------------------------------------------------------------------------------- 1 | //go:build ignore 2 | 3 | package main 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/jesseduffield/lazygit/pkg/cheatsheet" 9 | ) 10 | 11 | func main() { 12 | fmt.Printf("Generating cheatsheets in %s...\n", cheatsheet.GetKeybindingsDir()) 13 | cheatsheet.Generate() 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_freebsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package pty 5 | 6 | const ( 7 | _C_SPECNAMELEN = 0x3f 8 | ) 9 | 10 | type fiodgnameArg struct { 11 | Len int32 12 | Pad_cgo_0 [4]byte 13 | Buf *byte 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/v2/terminfo/TERMINALS.md: -------------------------------------------------------------------------------- 1 | TERMINALS 2 | ========= 3 | 4 | The best way to populate terminals on Debian is to install ncurses, 5 | ncurses-term, screen, tmux, rxvt-unicode, and dvtm. This populates the 6 | the terminfo database so that we can have a reasonable set of starting 7 | terminals. 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/discussion.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Discussion 3 | about: Begin a discussion 4 | title: '' 5 | labels: discussion 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Topic** 11 | A clear and concise description of what you want to discuss 12 | 13 | **Your thoughts** 14 | What you have to say about the topic 15 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ztypes_dragonfly_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_dragonfly.go 3 | 4 | package pty 5 | 6 | const ( 7 | _C_SPECNAMELEN = 0x3f 8 | ) 9 | 10 | type fiodgnameArg struct { 11 | Name *byte 12 | Len uint32 13 | Pad_cgo_0 [4]byte 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/plumbing/storer/index.go: -------------------------------------------------------------------------------- 1 | package storer 2 | 3 | import "github.com/jesseduffield/go-git/v5/plumbing/format/index" 4 | 5 | // IndexStorer generic storage of index.Index 6 | type IndexStorer interface { 7 | SetIndex(*index.Index) error 8 | Index() (*index.Index, error) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && !netbsd && !openbsd && arm64 6 | 7 | package cpu 8 | 9 | func doinit() {} 10 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux aix 2 | 3 | package logrus 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | const ioctlReadTermios = unix.TCGETS 8 | 9 | func isTerminal(fd int) bool { 10 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 11 | return err == nil 12 | } 13 | 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_solaris.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "golang.org/x/sys/unix" 5 | ) 6 | 7 | // IsTerminal returns true if the given file descriptor is a terminal. 8 | func isTerminal(fd int) bool { 9 | _, err := unix.IoctlGetTermio(fd, unix.TCGETA) 10 | return err == nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 64 10 | 11 | func initOptions() {} 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_loong64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build loong64 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 64 10 | 11 | func initOptions() { 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mipsx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build mips || mipsle 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | 11 | func initOptions() {} 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && riscv64 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | Initialized = true 11 | } 12 | -------------------------------------------------------------------------------- /docs/dev/README.md: -------------------------------------------------------------------------------- 1 | # Dev Documentation Overview 2 | 3 | * [Codebase Guide](./Codebase_Guide.md) 4 | * [Busy/Idle Tracking](./Busy.md) 5 | * [Integration Tests](../../pkg/integration/README.md) 6 | * [Demo Recordings](./Demo_Recordings.md) 7 | * [Find base commit for fixup design](Find_Base_Commit_For_Fixup_Design.md) 8 | * [Profiling](Profiling.md) 9 | -------------------------------------------------------------------------------- /vendor/github.com/gobwas/glob/syntax/syntax.go: -------------------------------------------------------------------------------- 1 | package syntax 2 | 3 | import ( 4 | "github.com/gobwas/glob/syntax/ast" 5 | "github.com/gobwas/glob/syntax/lexer" 6 | ) 7 | 8 | func Parse(s string) (*ast.Node, error) { 9 | return ast.Parse(lexer.NewLexer(s)) 10 | } 11 | 12 | func Special(b byte) bool { 13 | return lexer.Special(b) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/petermattis/goid/README.md: -------------------------------------------------------------------------------- 1 | # goid [![Build Status](https://travis-ci.org/petermattis/goid.svg?branch=master)](https://travis-ci.org/petermattis/goid) 2 | 3 | Programatically retrieve the current goroutine's ID. See [the CI 4 | configuration](.travis.yml) for supported Go versions. In addition, 5 | gccgo 7.2.1 (Go 1.8.3) is supported. 6 | -------------------------------------------------------------------------------- /vendor/github.com/sasha-s/go-deadlock/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./...); do 7 | go test -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /pkg/jsonschema/generator.go: -------------------------------------------------------------------------------- 1 | //go:build ignore 2 | 3 | package main 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/jesseduffield/lazygit/pkg/jsonschema" 9 | ) 10 | 11 | func main() { 12 | fmt.Printf("Generating jsonschema in %s...\n", jsonschema.GetSchemaDir()) 13 | jsonschema.GenerateSchema() 14 | jsonschema.GenerateConfigDocs() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && (mips64 || mips64le) 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | Initialized = true 11 | } 12 | -------------------------------------------------------------------------------- /pkg/config/config_default_platform.go: -------------------------------------------------------------------------------- 1 | //go:build !windows && !linux 2 | // +build !windows,!linux 3 | 4 | package config 5 | 6 | // GetPlatformDefaultConfig gets the defaults for the platform 7 | func GetPlatformDefaultConfig() OSConfig { 8 | return OSConfig{ 9 | Open: "open -- {{filename}}", 10 | OpenLink: "open {{link}}", 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd netbsd openbsd 2 | 3 | package logrus 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | const ioctlReadTermios = unix.TIOCGETA 8 | 9 | func isTerminal(fd int) bool { 10 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 11 | return err == nil 12 | } 13 | 14 | -------------------------------------------------------------------------------- /vendor/github.com/bahlo/generic-list-go/README.md: -------------------------------------------------------------------------------- 1 | # generic-list-go [![CI](https://github.com/bahlo/generic-list-go/actions/workflows/ci.yml/badge.svg)](https://github.com/bahlo/generic-list-go/actions/workflows/ci.yml) 2 | 3 | Go [container/list](https://pkg.go.dev/container/list) but with generics. 4 | 5 | The code is based on `container/list` in `go1.18beta2`. 6 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/appveyor.yml: -------------------------------------------------------------------------------- 1 | # This currently does nothing. We have moved to GitHub action, but this is kept 2 | # until spf13 has disabled this project in AppVeyor. 3 | version: '{build}' 4 | clone_folder: C:\gopath\src\github.com\spf13\afero 5 | environment: 6 | GOPATH: C:\gopath 7 | build_script: 8 | - cmd: >- 9 | go version 10 | 11 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x 6 | 7 | package cpu 8 | 9 | func doinit() {} 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows,!nacl,!plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func checkIfTerminal(w io.Writer) bool { 11 | switch v := w.(type) { 12 | case *os.File: 13 | return isTerminal(int(v.Fd())) 14 | default: 15 | return false 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | package cpu 8 | 9 | func getisar0() uint64 10 | func getisar1() uint64 11 | func getpfr0() uint64 12 | func getzfr0() uint64 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | type Errno = syscall.Errno 12 | type SysProcAttr = syscall.SysProcAttr 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !linux && (ppc64 || ppc64le) 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | PPC64.IsPOWER8 = true 11 | Initialized = true 12 | } 13 | -------------------------------------------------------------------------------- /test/global_git_config: -------------------------------------------------------------------------------- 1 | # This is the global git config we use for all our integration tests 2 | 3 | [user] 4 | name = CI 5 | email = CI@example.com 6 | [protocol "file"] 7 | # see https://vielmetti.typepad.com/logbook/2022/10/git-security-fixes-lead-to-fatal-transport-file-not-allowed-error-in-ci-systems-cve-2022-39253.html 8 | allow = always 9 | [commit] 10 | gpgSign = false 11 | -------------------------------------------------------------------------------- /vendor/github.com/gookit/color/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | *.swp 3 | .idea 4 | *.patch 5 | ### Go template 6 | # Binaries for programs and plugins 7 | *.exe 8 | *.exe~ 9 | *.dll 10 | *.so 11 | *.dylib 12 | 13 | # Test binary, build with `go test -c` 14 | *.test 15 | 16 | # Output of the go coverage tool, specifically when used with LiteIDE 17 | *.out 18 | .DS_Store 19 | app 20 | demo 21 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /pkg/gui/pty_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package gui 5 | 6 | import ( 7 | "os/exec" 8 | 9 | "github.com/jesseduffield/gocui" 10 | ) 11 | 12 | func (gui *Gui) onResize() error { 13 | return nil 14 | } 15 | 16 | func (gui *Gui) newPtyTask(view *gocui.View, cmd *exec.Cmd, prefix string) error { 17 | return gui.newCmdTask(view, cmd, prefix) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/go-logfmt/logfmt/doc.go: -------------------------------------------------------------------------------- 1 | // Package logfmt implements utilities to marshal and unmarshal data in the 2 | // logfmt format. The logfmt format records key/value pairs in a way that 3 | // balances readability for humans and simplicity of computer parsing. It is 4 | // most commonly used as a more human friendly alternative to JSON for 5 | // structured logging. 6 | package logfmt 7 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/plumbing/revision.go: -------------------------------------------------------------------------------- 1 | package plumbing 2 | 3 | // Revision represents a git revision 4 | // to get more details about git revisions 5 | // please check git manual page : 6 | // https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html 7 | type Revision string 8 | 9 | func (r Revision) String() string { 10 | return string(r) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo 6 | 7 | package cpu 8 | 9 | func getisar0() uint64 { return 0 } 10 | func getisar1() uint64 { return 0 } 11 | func getpfr0() uint64 { return 0 } 12 | -------------------------------------------------------------------------------- /vendor/github.com/integrii/flaggy/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.dll 4 | *.so 5 | *.dylib 6 | 7 | # Test binary, build with `go test -c` 8 | *.test 9 | 10 | # Output of the go coverage tool, specifically when used with LiteIDE 11 | *.out 12 | 13 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 14 | .glide/ 15 | 16 | .idea/ 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //go:noescape 12 | func gettimeofday(tv *Timeval) (err syscall.Errno) 13 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Documentation Overview 2 | 3 | * [Configuration](./Config.md). 4 | * [Custom Commands](./Custom_Command_Keybindings.md) 5 | * [Custom Pagers](./Custom_Pagers.md) 6 | * [Dev docs](./dev) 7 | * [Keybindings](./keybindings) 8 | * [Undo/Redo](./Undoing.md) 9 | * [Range Select](./Range_Select.md) 10 | * [Searching/Filtering](./Searching.md) 11 | * [Stacked Branches](./Stacked_Branches.md) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (!amd64 && !ppc64le && !s390x) || !gc || purego 6 | // +build !amd64,!ppc64le,!s390x !gc purego 7 | 8 | package poly1305 9 | 10 | type mac struct{ macGeneric } 11 | -------------------------------------------------------------------------------- /pkg/utils/regexp.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import "regexp" 4 | 5 | func FindNamedMatches(regex *regexp.Regexp, str string) map[string]string { 6 | match := regex.FindStringSubmatch(str) 7 | 8 | if len(match) == 0 { 9 | return nil 10 | } 11 | 12 | results := map[string]string{} 13 | for i, value := range match[1:] { 14 | results[regex.SubexpNames()[i+1]] = value 15 | } 16 | return results 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || linux || solaris || zos 6 | 7 | package term 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TCGETS 12 | const ioctlWriteTermios = unix.TCSETS 13 | -------------------------------------------------------------------------------- /vendor/github.com/aybabtme/humanlog/goreleaser.yaml: -------------------------------------------------------------------------------- 1 | build: 2 | main: ./cmd/humanlog/main.go 3 | binary: humanlog 4 | ldflags: 5 | - -s -w -X main.build={{.Version}} 6 | goos: 7 | - windows 8 | - darwin 9 | - linux 10 | goarch: 11 | - amd64 12 | 13 | brews: 14 | - github: 15 | owner: aybabtme 16 | name: homebrew-tap 17 | 18 | nfpms: 19 | - formats: 20 | - deb 21 | -------------------------------------------------------------------------------- /vendor/github.com/xanzy/ssh-agent/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /pkg/commands/oscommands/os_default_platform.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package oscommands 5 | 6 | import ( 7 | "runtime" 8 | ) 9 | 10 | func GetPlatform() *Platform { 11 | return &Platform{ 12 | OS: runtime.GOOS, 13 | Shell: "bash", 14 | ShellArg: "-c", 15 | OpenCommand: "open {{filename}}", 16 | OpenLinkCommand: "open {{link}}", 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !386 && !amd64 && !amd64p32 && !arm64 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | if err := readHWCAP(); err != nil { 11 | return 12 | } 13 | doinit() 14 | Initialized = true 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build mips64 || mips64le 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | 11 | func initOptions() { 12 | options = []option{ 13 | {Name: "msa", Feature: &MIPS64X.HasMSA}, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sync/errgroup/go120.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.20 6 | 7 | package errgroup 8 | 9 | import "context" 10 | 11 | func withCancelCause(parent context.Context) (context.Context, func(error)) { 12 | return context.WithCancelCause(parent) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/plumbing/storer/shallow.go: -------------------------------------------------------------------------------- 1 | package storer 2 | 3 | import "github.com/jesseduffield/go-git/v5/plumbing" 4 | 5 | // ShallowStorer is a storage of references to shallow commits by hash, 6 | // meaning that these commits have missing parents because of a shallow fetch. 7 | type ShallowStorer interface { 8 | SetShallow([]plumbing.Hash) error 9 | Shallow() ([]plumbing.Hash, error) 10 | } 11 | -------------------------------------------------------------------------------- /pkg/utils/errors.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import "github.com/go-errors/errors" 4 | 5 | // WrapError wraps an error for the sake of showing a stack trace at the top level 6 | // the go-errors package, for some reason, does not return nil when you try to wrap 7 | // a non-error, so we're just doing it here 8 | func WrapError(err error) error { 9 | if err == nil { 10 | return err 11 | } 12 | 13 | return errors.Wrap(err, 0) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_unix_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || dragonfly || freebsd || netbsd || openbsd 6 | 7 | package term 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /scripts/bump_lazycore.sh: -------------------------------------------------------------------------------- 1 | # Go's proxy servers are not very up-to-date so that's why we use `GOPROXY=direct` 2 | # We specify the `awesome` branch to avoid the default behaviour of looking for a semver tag. 3 | GOPROXY=direct go get -u github.com/jesseduffield/lazycore@master && go mod vendor && go mod tidy 4 | 5 | # Note to self if you ever want to fork a repo be sure to use this same approach: it's important to use the branch name (e.g. master) 6 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/internal/field/README: -------------------------------------------------------------------------------- 1 | This package is kept in sync with crypto/ed25519/internal/edwards25519/field in 2 | the standard library. 3 | 4 | If there are any changes in the standard library that need to be synced to this 5 | package, run sync.sh. It will not overwrite any local changes made since the 6 | previous sync, so it's ok to land changes in this package first, and then sync 7 | to the standard library later. 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !arm64 || !gc || purego 6 | // +build !arm64 !gc purego 7 | 8 | package field 9 | 10 | func (v *Element) carryPropagate() *Element { 11 | return v.carryPropagateGeneric() 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /scripts/bump_gocui.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Go's proxy servers are not very up-to-date so that's why we use `GOPROXY=direct` 4 | # We specify the `master` branch to avoid the default behaviour of looking for a semver tag. 5 | GOPROXY=direct go get -u github.com/jesseduffield/gocui@master && go mod vendor && go mod tidy 6 | 7 | # Note to self if you ever want to fork a repo be sure to use this same approach: it's important to use the branch name (e.g. master) 8 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/doc.go: -------------------------------------------------------------------------------- 1 | // Package pty provides functions for working with Unix terminals. 2 | package pty 3 | 4 | import ( 5 | "errors" 6 | "os" 7 | ) 8 | 9 | // ErrUnsupported is returned if a function is not 10 | // available on the current platform. 11 | var ErrUnsupported = errors.New("unsupported") 12 | 13 | // Opens a pty and its corresponding tty. 14 | func Open() (pty, tty *os.File, err error) { 15 | return open() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/mktypes.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | GOOSARCH="${GOOS}_${GOARCH}" 4 | case "$GOOSARCH" in 5 | _* | *_ | _) 6 | echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 7 | exit 1 8 | ;; 9 | esac 10 | 11 | GODEFS="go tool cgo -godefs" 12 | 13 | $GODEFS types.go |gofmt > ztypes_$GOARCH.go 14 | 15 | case $GOOS in 16 | freebsd|dragonfly|openbsd) 17 | $GODEFS types_$GOOS.go |gofmt > ztypes_$GOOSARCH.go 18 | ;; 19 | esac 20 | -------------------------------------------------------------------------------- /pkg/gui/types/suggestion.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type Suggestion struct { 4 | // value is the thing that we're matching on and the thing that will be submitted if you select the suggestion 5 | Value string 6 | // label is what is actually displayed so it can e.g. contain color 7 | Label string 8 | } 9 | 10 | // Conforming to the HasID interface, which is needed for list contexts 11 | func (self *Suggestion) ID() string { 12 | return self.Value 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/internal/revision/token.go: -------------------------------------------------------------------------------- 1 | package revision 2 | 3 | // token represents a entity extracted from string parsing 4 | type token int 5 | 6 | const ( 7 | eof token = iota 8 | 9 | aslash 10 | asterisk 11 | at 12 | caret 13 | cbrace 14 | colon 15 | control 16 | dot 17 | emark 18 | minus 19 | number 20 | obrace 21 | obracket 22 | qmark 23 | slash 24 | space 25 | tilde 26 | tokenError 27 | word 28 | ) 29 | -------------------------------------------------------------------------------- /vendor/github.com/petermattis/goid/runtime_gccgo_go1.8.go: -------------------------------------------------------------------------------- 1 | // +build gccgo,go1.8 2 | 3 | package goid 4 | 5 | // https://github.com/gcc-mirror/gcc/blob/gcc-7-branch/libgo/go/runtime/runtime2.go#L329-L422 6 | 7 | type g struct { 8 | _panic uintptr 9 | _defer uintptr 10 | m uintptr 11 | syscallsp uintptr 12 | syscallpc uintptr 13 | param uintptr 14 | atomicstatus uint32 15 | goid int64 // Here it is! 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 8 | JMP libc_sysctl(SB) 9 | 10 | GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 11 | DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ppc64 || ppc64le 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 128 10 | 11 | func initOptions() { 12 | options = []option{ 13 | {Name: "darn", Feature: &PPC64.HasDARN}, 14 | {Name: "scv", Feature: &PPC64.HasSCV}, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !amd64 || !gc || purego 6 | // +build !amd64 !gc purego 7 | 8 | package field 9 | 10 | func feMul(v, x, y *Element) { feMulGeneric(v, x, y) } 11 | 12 | func feSquare(v, x *Element) { feSquareGeneric(v, x) } 13 | -------------------------------------------------------------------------------- /pkg/utils/io.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "bufio" 5 | "os" 6 | ) 7 | 8 | func ForEachLineInFile(path string, f func(string, int)) error { 9 | file, err := os.Open(path) 10 | if err != nil { 11 | return err 12 | } 13 | defer file.Close() 14 | 15 | reader := bufio.NewReader(file) 16 | for i := 0; true; i++ { 17 | line, err := reader.ReadString('\n') 18 | if err != nil { 19 | break 20 | } 21 | f(line, i) 22 | } 23 | 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /pkg/utils/once_writer_test.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "bytes" 5 | "testing" 6 | ) 7 | 8 | func TestOnceWriter(t *testing.T) { 9 | innerWriter := bytes.NewBuffer(nil) 10 | counter := 0 11 | onceWriter := NewOnceWriter(innerWriter, func() { 12 | counter += 1 13 | }) 14 | _, _ = onceWriter.Write([]byte("hello")) 15 | _, _ = onceWriter.Write([]byte("hello")) 16 | if counter != 1 { 17 | t.Errorf("expected counter to be 1, got %d", counter) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package cpu 8 | 9 | // IsBigEndian records whether the GOARCH's byte order is big endian. 10 | const IsBigEndian = true 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | type Signal = syscall.Signal 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /pkg/config/dummies.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "gopkg.in/yaml.v3" 5 | ) 6 | 7 | // NewDummyAppConfig creates a new dummy AppConfig for testing 8 | func NewDummyAppConfig() *AppConfig { 9 | appConfig := &AppConfig{ 10 | Name: "lazygit", 11 | Version: "unversioned", 12 | Debug: false, 13 | UserConfig: GetDefaultConfig(), 14 | AppState: &AppState{}, 15 | } 16 | _ = yaml.Unmarshal([]byte{}, appConfig.AppState) 17 | return appConfig 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/buger/jsonparser/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.6 2 | 3 | RUN go get github.com/Jeffail/gabs 4 | RUN go get github.com/bitly/go-simplejson 5 | RUN go get github.com/pquerna/ffjson 6 | RUN go get github.com/antonholmquist/jason 7 | RUN go get github.com/mreiferson/go-ujson 8 | RUN go get -tags=unsafe -u github.com/ugorji/go/codec 9 | RUN go get github.com/mailru/easyjson 10 | 11 | WORKDIR /go/src/github.com/buger/jsonparser 12 | ADD . /go/src/github.com/buger/jsonparser -------------------------------------------------------------------------------- /vendor/golang.org/x/sync/errgroup/pre_go120.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.20 6 | 7 | package errgroup 8 | 9 | import "context" 10 | 11 | func withCancelCause(parent context.Context) (context.Context, func(error)) { 12 | ctx, cancel := context.WithCancel(parent) 13 | return ctx, func(error) { cancel() } 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.21 6 | 7 | package cpu 8 | 9 | import ( 10 | _ "unsafe" // for linkname 11 | ) 12 | 13 | //go:linkname runtime_getAuxv runtime.getAuxv 14 | func runtime_getAuxv() []uintptr 15 | 16 | func init() { 17 | getAuxvFn = runtime_getAuxv 18 | } 19 | -------------------------------------------------------------------------------- /pkg/commands/models/remote.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | // Remote : A git remote 4 | type Remote struct { 5 | Name string 6 | Urls []string 7 | Branches []*RemoteBranch 8 | } 9 | 10 | func (r *Remote) RefName() string { 11 | return r.Name 12 | } 13 | 14 | func (r *Remote) ID() string { 15 | return r.RefName() 16 | } 17 | 18 | func (r *Remote) URN() string { 19 | return "remote-" + r.ID() 20 | } 21 | 22 | func (r *Remote) Description() string { 23 | return r.RefName() 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && gc && !purego 6 | // +build arm64,gc,!purego 7 | 8 | package field 9 | 10 | //go:noescape 11 | func carryPropagate(v *Element) 12 | 13 | func (v *Element) carryPropagate() *Element { 14 | carryPropagate(v) 15 | return v 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/runtime_auxv.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | // getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init) 8 | // on platforms that use auxv. 9 | var getAuxvFn func() []uintptr 10 | 11 | func getAuxv() []uintptr { 12 | if getAuxvFn == nil { 13 | return nil 14 | } 15 | return getAuxvFn() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && !ios) || zos 6 | 7 | package unix 8 | 9 | // SysvShmCtl performs control operations on the shared memory segment 10 | // specified by id. 11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 12 | return shmctl(id, cmd, desc) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm 6 | 7 | package cpu 8 | 9 | // IsBigEndian records whether the GOARCH's byte order is big endian. 10 | const IsBigEndian = false 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.5 6 | 7 | package plan9 8 | 9 | import "syscall" 10 | 11 | func fixwd() { 12 | syscall.Fixwd() 13 | } 14 | 15 | func Getwd() (wd string, err error) { 16 | return syscall.Getwd() 17 | } 18 | 19 | func Chdir(path string) error { 20 | return syscall.Chdir(path) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/encoding/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | We take security very seriously in mangos, since you may be using it in 4 | Internet-facing applications. 5 | 6 | ## Reporting a Vulnerability 7 | 8 | To report a vulnerability, please contact us on our discord. 9 | You may also send an email to garrett@damore.org, or info@staysail.tech. 10 | 11 | We will keep the reporter updated on any status updates on a regular basis, 12 | and will respond within two business days for any reported security issue. 13 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/app" 5 | ) 6 | 7 | // These values may be set by the build script via the LDFLAGS argument 8 | var ( 9 | commit string 10 | date string 11 | version string 12 | buildSource = "unknown" 13 | ) 14 | 15 | func main() { 16 | ldFlagsBuildInfo := &app.BuildInfo{ 17 | Commit: commit, 18 | Date: date, 19 | Version: version, 20 | BuildSource: buildSource, 21 | } 22 | 23 | app.Start(ldFlagsBuildInfo, nil) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/gobwas/glob/match/nothing.go: -------------------------------------------------------------------------------- 1 | package match 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type Nothing struct{} 8 | 9 | func NewNothing() Nothing { 10 | return Nothing{} 11 | } 12 | 13 | func (self Nothing) Match(s string) bool { 14 | return len(s) == 0 15 | } 16 | 17 | func (self Nothing) Index(s string) (int, []int) { 18 | return 0, segments0 19 | } 20 | 21 | func (self Nothing) Len() int { 22 | return lenZero 23 | } 24 | 25 | func (self Nothing) String() string { 26 | return fmt.Sprintf("") 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/plumbing/storer/storer.go: -------------------------------------------------------------------------------- 1 | package storer 2 | 3 | // Storer is a basic storer for encoded objects and references. 4 | type Storer interface { 5 | EncodedObjectStorer 6 | ReferenceStorer 7 | } 8 | 9 | // Initializer should be implemented by storers that require to perform any 10 | // operation when creating a new repository (i.e. git init). 11 | type Initializer interface { 12 | // Init performs initialization of the storer and returns the error, if 13 | // any. 14 | Init() error 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.17 2 | // +build !go1.17 3 | 4 | // TODO: once support for Go 1.16 is dropped, this file can be 5 | // merged/removed with assertion_compare_go1.17_test.go and 6 | // assertion_compare_can_convert.go 7 | 8 | package assert 9 | 10 | import "reflect" 11 | 12 | // Older versions of Go does not have the reflect.Value.CanConvert 13 | // method. 14 | func canConvert(value reflect.Value, to reflect.Type) bool { 15 | return false 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | 7 | package unix 8 | 9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 10 | // values. 11 | 12 | //sys Alarm(seconds uint) (remaining uint, err error) 13 | -------------------------------------------------------------------------------- /pkg/gui/controllers/common.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers" 5 | ) 6 | 7 | type ControllerCommon struct { 8 | *helpers.HelperCommon 9 | IGetHelpers 10 | } 11 | 12 | type IGetHelpers interface { 13 | Helpers() *helpers.Helpers 14 | } 15 | 16 | func NewControllerCommon( 17 | c *helpers.HelperCommon, 18 | IGetHelpers IGetHelpers, 19 | ) *ControllerCommon { 20 | return &ControllerCommon{ 21 | HelperCommon: c, 22 | IGetHelpers: IGetHelpers, 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /pkg/gui/presentation/suggestions.go: -------------------------------------------------------------------------------- 1 | package presentation 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/gui/types" 5 | "github.com/samber/lo" 6 | ) 7 | 8 | func GetSuggestionListDisplayStrings(suggestions []*types.Suggestion) [][]string { 9 | return lo.Map(suggestions, func(suggestion *types.Suggestion, _ int) []string { 10 | return getSuggestionDisplayStrings(suggestion) 11 | }) 12 | } 13 | 14 | func getSuggestionDisplayStrings(suggestion *types.Suggestion) []string { 15 | return []string{suggestion.Label} 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go: -------------------------------------------------------------------------------- 1 | //go:build go1.17 2 | // +build go1.17 3 | 4 | // TODO: once support for Go 1.16 is dropped, this file can be 5 | // merged/removed with assertion_compare_go1.17_test.go and 6 | // assertion_compare_legacy.go 7 | 8 | package assert 9 | 10 | import "reflect" 11 | 12 | // Wrapper around reflect.Value.CanConvert, for compatibility 13 | // reasons. 14 | func canConvert(value reflect.Value, to reflect.Type) bool { 15 | return value.CanConvert(to) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/chacha20/chacha_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (!arm64 && !s390x && !ppc64le) || (arm64 && !go1.11) || !gc || purego 6 | // +build !arm64,!s390x,!ppc64le arm64,!go1.11 !gc purego 7 | 8 | package chacha20 9 | 10 | const bufSize = blockSize 11 | 12 | func (s *Cipher) xorKeyStreamBlocks(dst, src []byte) { 13 | s.xorKeyStreamBlocksGeneric(dst, src) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/v2/terminfo/gen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | while read line 3 | do 4 | case "$line" in 5 | *'|'*) 6 | alias=${line#*|} 7 | line=${line%|*} 8 | ;; 9 | *) 10 | alias=${line%%,*} 11 | ;; 12 | esac 13 | 14 | alias=${alias//-/_} 15 | direc=${alias:0:1} 16 | 17 | mkdir -p ${direc}/${alias} 18 | go run mkinfo.go -P ${alias} -go ${direc}/${alias}/term.go ${line//,/ } 19 | done < models.txt 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_wasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build wasm 6 | 7 | package cpu 8 | 9 | // We're compiling the cpu package for an unknown (software-abstracted) CPU. 10 | // Make CacheLinePad an empty struct and hope that the usual struct alignment 11 | // rules are good enough. 12 | 13 | const cacheLineSize = 0 14 | 15 | func initOptions() {} 16 | 17 | func archInit() {} 18 | -------------------------------------------------------------------------------- /pkg/gui/types/modes.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/gui/modes/cherrypicking" 5 | "github.com/jesseduffield/lazygit/pkg/gui/modes/diffing" 6 | "github.com/jesseduffield/lazygit/pkg/gui/modes/filtering" 7 | "github.com/jesseduffield/lazygit/pkg/gui/modes/marked_base_commit" 8 | ) 9 | 10 | type Modes struct { 11 | Filtering filtering.Filtering 12 | CherryPicking *cherrypicking.CherryPicking 13 | Diffing diffing.Diffing 14 | MarkedBaseCommit marked_base_commit.MarkedBaseCommit 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/forward_assertions.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs" 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/pwd_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.5 6 | 7 | package plan9 8 | 9 | func fixwd() { 10 | } 11 | 12 | func Getwd() (wd string, err error) { 13 | fd, err := open(".", O_RDONLY) 14 | if err != nil { 15 | return "", err 16 | } 17 | defer Close(fd) 18 | return Fd2path(fd) 19 | } 20 | 21 | func Chdir(path string) error { 22 | return chdir(path) 23 | } 24 | -------------------------------------------------------------------------------- /pkg/gui/context/history_trait.go: -------------------------------------------------------------------------------- 1 | package context 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/utils" 5 | ) 6 | 7 | // Maintains a list of strings that have previously been searched/filtered for 8 | type SearchHistory struct { 9 | history *utils.HistoryBuffer[string] 10 | } 11 | 12 | func NewSearchHistory() *SearchHistory { 13 | return &SearchHistory{ 14 | history: utils.NewHistoryBuffer[string](1000), 15 | } 16 | } 17 | 18 | func (self *SearchHistory) GetSearchHistory() *utils.HistoryBuffer[string] { 19 | return self.history 20 | } 21 | -------------------------------------------------------------------------------- /pkg/gui/controllers/helpers/amend_helper.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | type AmendHelper struct { 4 | c *HelperCommon 5 | gpg *GpgHelper 6 | } 7 | 8 | func NewAmendHelper( 9 | c *HelperCommon, 10 | gpg *GpgHelper, 11 | ) *AmendHelper { 12 | return &AmendHelper{ 13 | c: c, 14 | gpg: gpg, 15 | } 16 | } 17 | 18 | func (self *AmendHelper) AmendHead() error { 19 | cmdObj := self.c.Git().Commit.AmendHeadCmdObj() 20 | self.c.LogAction(self.c.Tr.Actions.AmendCommit) 21 | return self.gpg.WithGpgHandling(cmdObj, self.c.Tr.AmendingStatus, nil) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/go-git/go-billy/v5/osfs/os_posix.go: -------------------------------------------------------------------------------- 1 | // +build !plan9,!windows 2 | 3 | package osfs 4 | 5 | import ( 6 | "os" 7 | 8 | "golang.org/x/sys/unix" 9 | ) 10 | 11 | func (f *file) Lock() error { 12 | f.m.Lock() 13 | defer f.m.Unlock() 14 | 15 | return unix.Flock(int(f.File.Fd()), unix.LOCK_EX) 16 | } 17 | 18 | func (f *file) Unlock() error { 19 | f.m.Lock() 20 | defer f.m.Unlock() 21 | 22 | return unix.Flock(int(f.File.Fd()), unix.LOCK_UN) 23 | } 24 | 25 | func rename(from, to string) error { 26 | return os.Rename(from, to) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/doc.go: -------------------------------------------------------------------------------- 1 | // A highly extensible git implementation in pure Go. 2 | // 3 | // go-git aims to reach the completeness of libgit2 or jgit, nowadays covers the 4 | // majority of the plumbing read operations and some of the main write 5 | // operations, but lacks the main porcelain operations such as merges. 6 | // 7 | // It is highly extensible, we have been following the open/close principle in 8 | // its design to facilitate extensions, mainly focusing the efforts on the 9 | // persistence of the objects. 10 | package git 11 | -------------------------------------------------------------------------------- /vendor/github.com/sergi/go-diff/diffmatchpatch/operation_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Operation -trimprefix=Diff"; DO NOT EDIT. 2 | 3 | package diffmatchpatch 4 | 5 | import "fmt" 6 | 7 | const _Operation_name = "DeleteEqualInsert" 8 | 9 | var _Operation_index = [...]uint8{0, 6, 11, 17} 10 | 11 | func (i Operation) String() string { 12 | i -= -1 13 | if i < 0 || i >= Operation(len(_Operation_index)-1) { 14 | return fmt.Sprintf("Operation(%d)", i+-1) 15 | } 16 | return _Operation_name[_Operation_index[i]:_Operation_index[i+1]] 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go: -------------------------------------------------------------------------------- 1 | // Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT. 2 | 3 | //go:build amd64 && gc && !purego 4 | // +build amd64,gc,!purego 5 | 6 | package field 7 | 8 | // feMul sets out = a * b. It works like feMulGeneric. 9 | // 10 | //go:noescape 11 | func feMul(out *Element, a *Element, b *Element) 12 | 13 | // feSquare sets out = a * a. It works like feSquareGeneric. 14 | // 15 | //go:noescape 16 | func feSquare(out *Element, a *Element) 17 | -------------------------------------------------------------------------------- /vendor/github.com/kardianos/osext/osext_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //+build !go1.8 6 | 7 | package osext 8 | 9 | import ( 10 | "os" 11 | "strconv" 12 | "syscall" 13 | ) 14 | 15 | func executable() (string, error) { 16 | f, err := os.Open("/proc/" + strconv.Itoa(os.Getpid()) + "/text") 17 | if err != nil { 18 | return "", err 19 | } 20 | defer f.Close() 21 | return syscall.Fd2path(int(f.Fd())) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/v2/terminfo/models.txt: -------------------------------------------------------------------------------- 1 | aixterm 2 | alacritty 3 | ansi 4 | beterm 5 | cygwin 6 | dtterm 7 | eterm,eterm-color|emacs 8 | gnome,gnome-256color 9 | hpterm 10 | konsole,konsole-256color 11 | kterm 12 | linux 13 | pcansi 14 | rxvt,rxvt-256color,rxvt-88color,rxvt-unicode,rxvt-unicode-256color 15 | screen,screen-256color 16 | st,st-256color|simpleterm 17 | tmux 18 | vt52 19 | vt100 20 | vt102 21 | vt220 22 | vt320 23 | vt400 24 | vt420 25 | wy50 26 | wy60 27 | wy99-ansi,wy99a-ansi 28 | xfce 29 | xterm,xterm-88color,xterm-256color 30 | xterm-kitty 31 | -------------------------------------------------------------------------------- /scripts/check_filenames.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Find all Go files in the project directory and its subdirectories, except in the vendor directory 4 | for file in $(find . -name "*.go" -not -path "./vendor/*"); do 5 | 6 | # Check if the file name contains uppercase letters 7 | if [[ "$file" =~ [A-Z] ]]; then 8 | echo "Error: $file contains uppercase letters. All Go files in the project (excluding vendor directory) must use snake_case" 9 | exit 1 10 | fi 11 | done 12 | 13 | echo "All Go files in the project (excluding vendor directory) use lowercase letters" 14 | exit 0 15 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/Dockerfile.riscv: -------------------------------------------------------------------------------- 1 | FROM golang:1.13 2 | 3 | # Clone and complie a riscv compatible version of the go compiler. 4 | RUN git clone https://review.gerrithub.io/riscv/riscv-go /riscv-go 5 | # riscvdev branch HEAD as of 2019-06-29. 6 | RUN cd /riscv-go && git checkout 04885fddd096d09d4450726064d06dd107e374bf 7 | ENV PATH=/riscv-go/misc/riscv:/riscv-go/bin:$PATH 8 | RUN cd /riscv-go/src && GOROOT_BOOTSTRAP=$(go env GOROOT) ./make.bash 9 | ENV GOROOT=/riscv-go 10 | 11 | # Make sure we compile. 12 | WORKDIR pty 13 | ADD . . 14 | RUN GOOS=linux GOARCH=riscv go build 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc && !purego 6 | // +build gc,!purego 7 | 8 | package chacha20 9 | 10 | const bufSize = 256 11 | 12 | //go:noescape 13 | func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32) 14 | 15 | func (c *Cipher) xorKeyStreamBlocks(dst, src []byte) { 16 | chaCha20_ctr32_vsx(&dst[0], &src[0], len(src), &c.key, &c.counter) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | //go:build appengine || js || nacl || wasm 2 | // +build appengine js nacl wasm 3 | 4 | package isatty 5 | 6 | // IsTerminal returns true if the file descriptor is terminal which 7 | // is always false on js and appengine classic which is a sandboxed PaaS. 8 | func IsTerminal(fd uintptr) bool { 9 | return false 10 | } 11 | 12 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 13 | // terminal. This is also always false on this environment. 14 | func IsCygwinTerminal(fd uintptr) bool { 15 | return false 16 | } 17 | -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | changelog: 2 | exclude: 3 | labels: 4 | - ignore-for-release 5 | categories: 6 | - title: Features ✨ 7 | labels: 8 | - feature 9 | - title: Enhancements 🔥 10 | labels: 11 | - enhancement 12 | - title: Fixes 🔧 13 | labels: 14 | - bug 15 | - title: Maintenance ⚙️ 16 | labels: 17 | - maintenance 18 | - title: Docs 📖 19 | labels: 20 | - docs 21 | - title: I18n 🌎 22 | labels: 23 | - i18n 24 | - title: Other Changes 25 | labels: 26 | - "*" 27 | -------------------------------------------------------------------------------- /pkg/utils/string_stack.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | type StringStack struct { 4 | stack []string 5 | } 6 | 7 | func (self *StringStack) Push(s string) { 8 | self.stack = append(self.stack, s) 9 | } 10 | 11 | func (self *StringStack) Pop() string { 12 | if len(self.stack) == 0 { 13 | return "" 14 | } 15 | n := len(self.stack) - 1 16 | last := self.stack[n] 17 | self.stack = self.stack[:n] 18 | return last 19 | } 20 | 21 | func (self *StringStack) IsEmpty() bool { 22 | return len(self.stack) == 0 23 | } 24 | 25 | func (self *StringStack) Clear() { 26 | self.stack = []string{} 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/storage/filesystem/module.go: -------------------------------------------------------------------------------- 1 | package filesystem 2 | 3 | import ( 4 | "github.com/jesseduffield/go-git/v5/plumbing/cache" 5 | "github.com/jesseduffield/go-git/v5/storage" 6 | "github.com/jesseduffield/go-git/v5/storage/filesystem/dotgit" 7 | ) 8 | 9 | type ModuleStorage struct { 10 | dir *dotgit.DotGit 11 | } 12 | 13 | func (s *ModuleStorage) Module(name string) (storage.Storer, error) { 14 | fs, err := s.dir.Module(name) 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | return NewStorage(fs, cache.NewObjectLRUDefault()), nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/chacha20/chacha_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.11 && gc && !purego 6 | // +build go1.11,gc,!purego 7 | 8 | package chacha20 9 | 10 | const bufSize = 256 11 | 12 | //go:noescape 13 | func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32) 14 | 15 | func (c *Cipher) xorKeyStreamBlocks(dst, src []byte) { 16 | xorKeyStreamVX(dst, src, &c.key, &c.nonce, &c.counter) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (386 || amd64 || amd64p32) && gc 6 | 7 | package cpu 8 | 9 | // cpuid is implemented in cpu_x86.s for gc compiler 10 | // and in cpu_gccgo.c for gccgo. 11 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 12 | 13 | // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler 14 | // and in cpu_gccgo.c for gccgo. 15 | func xgetbv() (eax, edx uint32) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build plan9 && !race 6 | 7 | package plan9 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /cmd/i18n/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "log" 6 | "os" 7 | 8 | "github.com/jesseduffield/lazygit/pkg/i18n" 9 | ) 10 | 11 | func saveLanguageFileToJson(tr *i18n.TranslationSet, filepath string) error { 12 | jsonData, err := json.MarshalIndent(tr, "", " ") 13 | if err != nil { 14 | return err 15 | } 16 | 17 | jsonData = append(jsonData, '\n') 18 | return os.WriteFile(filepath, jsonData, 0o644) 19 | } 20 | 21 | func main() { 22 | err := saveLanguageFileToJson(i18n.EnglishTranslationSet(), "en.json") 23 | if err != nil { 24 | log.Fatal(err) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/v2/SECURITY.md: -------------------------------------------------------------------------------- 1 | # SECURITY 2 | 3 | It's somewhat unlikely that tcell is in a security sensitive path, 4 | but we do take security seriously. 5 | 6 | ## Vulnerabilityu Response 7 | 8 | If you report a vulnerability, we will respond within 2 business days. 9 | 10 | ## Report a Vulnerability 11 | 12 | If you wish to report a vulnerability found in tcell, simply send a message 13 | to garrett@damore.org. You may also reach us on our discord channel - 14 | https://discord.gg/urTTxDN - a private message to `gdamore` on that channel 15 | may be submitted instead of mail. 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | COMMAND="mksysnum_plan9.sh $@" 7 | 8 | cat <= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/buger/jsonparser/bytes_safe.go: -------------------------------------------------------------------------------- 1 | // +build appengine appenginevm 2 | 3 | package jsonparser 4 | 5 | import ( 6 | "strconv" 7 | ) 8 | 9 | // See fastbytes_unsafe.go for explanation on why *[]byte is used (signatures must be consistent with those in that file) 10 | 11 | func equalStr(b *[]byte, s string) bool { 12 | return string(*b) == s 13 | } 14 | 15 | func parseFloat(b *[]byte) (float64, error) { 16 | return strconv.ParseFloat(string(*b), 64) 17 | } 18 | 19 | func bytesToString(b *[]byte) string { 20 | return string(*b) 21 | } 22 | 23 | func StringToBytes(s string) []byte { 24 | return []byte(s) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | //go:build (linux || aix || zos) && !appengine 2 | // +build linux aix zos 3 | // +build !appengine 4 | 5 | package isatty 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | // IsTerminal return true if the file descriptor is terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 12 | return err == nil 13 | } 14 | 15 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 16 | // terminal. This is also always false on this environment. 17 | func IsCygwinTerminal(fd uintptr) bool { 18 | return false 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /pkg/integration/tests/branch/open_with_cli_arg.go: -------------------------------------------------------------------------------- 1 | package branch 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/config" 5 | . "github.com/jesseduffield/lazygit/pkg/integration/components" 6 | ) 7 | 8 | var OpenWithCliArg = NewIntegrationTest(NewIntegrationTestArgs{ 9 | Description: "Open straight to branches panel using a CLI arg", 10 | ExtraCmdArgs: []string{"branch"}, 11 | Skip: false, 12 | SetupConfig: func(config *config.AppConfig) {}, 13 | SetupRepo: func(shell *Shell) { 14 | }, 15 | Run: func(t *TestDriver, keys config.KeybindingConfig) { 16 | t.Views().Branches().IsFocused() 17 | }, 18 | }) 19 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v3/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # run with: 2 | # docker build -t lazygit . 3 | # docker run -it lazygit:latest /bin/sh 4 | 5 | FROM golang:1.22 as build 6 | WORKDIR /go/src/github.com/jesseduffield/lazygit/ 7 | COPY go.mod go.sum ./ 8 | RUN go mod download 9 | COPY . . 10 | RUN CGO_ENABLED=0 GOOS=linux go build 11 | 12 | FROM alpine:3.19 13 | RUN apk add --no-cache -U git xdg-utils 14 | WORKDIR /go/src/github.com/jesseduffield/lazygit/ 15 | COPY --from=build /go/src/github.com/jesseduffield/lazygit ./ 16 | COPY --from=build /go/src/github.com/jesseduffield/lazygit/lazygit /bin/ 17 | RUN echo "alias gg=lazygit" >> ~/.profile 18 | 19 | ENTRYPOINT [ "lazygit" ] 20 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/jibber_jabber/jibber_jabber.go: -------------------------------------------------------------------------------- 1 | package jibber_jabber 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | const ( 8 | COULD_NOT_DETECT_PACKAGE_ERROR_MESSAGE = "Could not detect Language" 9 | ) 10 | 11 | func splitLocale(locale string) (string, string) { 12 | formattedLocale := strings.Split(locale, ".")[0] 13 | formattedLocale = strings.Replace(formattedLocale, "-", "_", -1) 14 | 15 | pieces := strings.Split(formattedLocale, "_") 16 | language := pieces[0] 17 | territory := "" 18 | if len(pieces) > 1 { 19 | territory = strings.Split(formattedLocale, "_")[1] 20 | } 21 | return language, territory 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/worktree_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package git 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | 9 | "github.com/jesseduffield/go-git/v5/plumbing/format/index" 10 | ) 11 | 12 | func init() { 13 | fillSystemInfo = func(e *index.Entry, sys interface{}) { 14 | if os, ok := sys.(*syscall.Stat_t); ok { 15 | e.CreatedAt = time.Unix(int64(os.Ctim.Sec), int64(os.Ctim.Nsec)) 16 | e.Dev = uint32(os.Dev) 17 | e.Inode = uint32(os.Ino) 18 | e.GID = os.Gid 19 | e.UID = os.Uid 20 | } 21 | } 22 | } 23 | 24 | func isSymlinkWindowsNonAdmin(err error) bool { 25 | return false 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // SysvShmCtl performs control operations on the shared memory segment 12 | // specified by id. 13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 14 | if runtime.GOARCH == "arm" || 15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 16 | cmd |= ipc_64 17 | } 18 | 19 | return shmctl(id, cmd, desc) 20 | } 21 | -------------------------------------------------------------------------------- /pkg/integration/tests/filter_by_path/cli_arg.go: -------------------------------------------------------------------------------- 1 | package filter_by_path 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/config" 5 | . "github.com/jesseduffield/lazygit/pkg/integration/components" 6 | ) 7 | 8 | var CliArg = NewIntegrationTest(NewIntegrationTestArgs{ 9 | Description: "Filter commits by file path, using CLI arg", 10 | ExtraCmdArgs: []string{"-f=filterFile"}, 11 | Skip: false, 12 | SetupConfig: func(config *config.AppConfig) { 13 | }, 14 | SetupRepo: func(shell *Shell) { 15 | commonSetup(shell) 16 | }, 17 | Run: func(t *TestDriver, keys config.KeybindingConfig) { 18 | postFilterTest(t) 19 | }, 20 | }) 21 | -------------------------------------------------------------------------------- /vendor/github.com/sergi/go-diff/diffmatchpatch/mathutil.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved. 2 | // https://github.com/sergi/go-diff 3 | // See the included LICENSE file for license details. 4 | // 5 | // go-diff is a Go implementation of Google's Diff, Match, and Patch library 6 | // Original library is Copyright (c) 2006 Google Inc. 7 | // http://code.google.com/p/google-diff-match-patch/ 8 | 9 | package diffmatchpatch 10 | 11 | func min(x, y int) int { 12 | if x < y { 13 | return x 14 | } 15 | return y 16 | } 17 | 18 | func max(x, y int) int { 19 | if x > y { 20 | return x 21 | } 22 | return y 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.13 6 | // +build go1.13 7 | 8 | package poly1305 9 | 10 | import "math/bits" 11 | 12 | func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) { 13 | return bits.Add64(x, y, carry) 14 | } 15 | 16 | func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) { 17 | return bits.Sub64(x, y, borrow) 18 | } 19 | 20 | func bitsMul64(x, y uint64) (hi, lo uint64) { 21 | return bits.Mul64(x, y) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_plan9.go: -------------------------------------------------------------------------------- 1 | //go:build plan9 2 | // +build plan9 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | path, err := syscall.Fd2path(int(fd)) 13 | if err != nil { 14 | return false 15 | } 16 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 17 | } 18 | 19 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 20 | // terminal. This is also always false on this environment. 21 | func IsCygwinTerminal(fd uintptr) bool { 22 | return false 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows && !appengine 2 | // +build windows,!appengine 3 | 4 | package runewidth 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | var ( 11 | kernel32 = syscall.NewLazyDLL("kernel32") 12 | procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") 13 | ) 14 | 15 | // IsEastAsian return true if the current locale is CJK 16 | func IsEastAsian() bool { 17 | r1, _, _ := procGetConsoleOutputCP.Call() 18 | if r1 == 0 { 19 | return false 20 | } 21 | 22 | switch int(r1) { 23 | case 932, 51932, 936, 949, 950: 24 | return true 25 | } 26 | 27 | return false 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/sahilm/fuzzy/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | branch = "master" 6 | digest = "1:ee97ec8a00b2424570c1ce53d7b410e96fbd4c241b29df134276ff6aa3750335" 7 | name = "github.com/kylelemons/godebug" 8 | packages = [ 9 | "diff", 10 | "pretty", 11 | ] 12 | pruneopts = "" 13 | revision = "d65d576e9348f5982d7f6d83682b694e731a45c6" 14 | 15 | [solve-meta] 16 | analyzer-name = "dep" 17 | analyzer-version = 1 18 | input-imports = ["github.com/kylelemons/godebug/pretty"] 19 | solver-name = "gps-cdcl" 20 | solver-version = 1 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Please do not add personal files 2 | 3 | # Logs 4 | *.log 5 | 6 | # Hidden 7 | .* 8 | 9 | # Notes 10 | *.notes 11 | 12 | # Tests 13 | test/repos/repo 14 | coverage.txt 15 | 16 | # Binaries 17 | lazygit 18 | lazygit.exe 19 | 20 | # Exceptions 21 | !.gitignore 22 | !.gitattributes 23 | !.goreleaser.yml 24 | !.golangci.yml 25 | !.circleci/ 26 | !.github/ 27 | !.vscode/ 28 | !.devcontainer/ 29 | 30 | # these are for our integration tests 31 | !.git_keep 32 | !.gitmodules_keep 33 | 34 | test/git_server/data 35 | 36 | test/_results/** 37 | 38 | oryxBuildBinary 39 | __debug_bin 40 | 41 | .worktrees 42 | demo/output/* 43 | 44 | coverage.out 45 | -------------------------------------------------------------------------------- /pkg/logs/tail/logs_default.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package tail 5 | 6 | import ( 7 | "log" 8 | "os" 9 | "os/exec" 10 | 11 | "github.com/aybabtme/humanlog" 12 | ) 13 | 14 | func tailLogsForPlatform(logFilePath string, opts *humanlog.HandlerOptions) { 15 | cmd := exec.Command("tail", "-f", logFilePath) 16 | 17 | stdout, _ := cmd.StdoutPipe() 18 | if err := cmd.Start(); err != nil { 19 | log.Fatal(err) 20 | } 21 | 22 | if err := humanlog.Scanner(stdout, os.Stdout, opts); err != nil { 23 | log.Fatal(err) 24 | } 25 | 26 | if err := cmd.Wait(); err != nil { 27 | log.Fatal(err) 28 | } 29 | 30 | os.Exit(0) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/worktree_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd netbsd 2 | 3 | package git 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | 9 | "github.com/jesseduffield/go-git/v5/plumbing/format/index" 10 | ) 11 | 12 | func init() { 13 | fillSystemInfo = func(e *index.Entry, sys interface{}) { 14 | if os, ok := sys.(*syscall.Stat_t); ok { 15 | e.CreatedAt = time.Unix(int64(os.Atimespec.Sec), int64(os.Atimespec.Nsec)) 16 | e.Dev = uint32(os.Dev) 17 | e.Inode = uint32(os.Ino) 18 | e.GID = os.Gid 19 | e.UID = os.Uid 20 | } 21 | } 22 | } 23 | 24 | func isSymlinkWindowsNonAdmin(err error) bool { 25 | return false 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/samber/lo/test.go: -------------------------------------------------------------------------------- 1 | package lo 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | "time" 7 | ) 8 | 9 | // https://github.com/stretchr/testify/issues/1101 10 | func testWithTimeout(t *testing.T, timeout time.Duration) { 11 | t.Helper() 12 | 13 | testFinished := make(chan struct{}) 14 | t.Cleanup(func() { close(testFinished) }) 15 | 16 | go func() { 17 | select { 18 | case <-testFinished: 19 | case <-time.After(timeout): 20 | t.Errorf("test timed out after %s", timeout) 21 | os.Exit(1) 22 | } 23 | }() 24 | } 25 | 26 | type foo struct { 27 | bar string 28 | } 29 | 30 | func (f foo) Clone() foo { 31 | return foo{f.bar} 32 | } 33 | -------------------------------------------------------------------------------- /pkg/commands/oscommands/cmd_obj_runner_default.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package oscommands 5 | 6 | import ( 7 | "os/exec" 8 | 9 | "github.com/creack/pty" 10 | ) 11 | 12 | // we define this separately for windows and non-windows given that windows does 13 | // not have great PTY support and we need a PTY to handle a credential request 14 | func (self *cmdObjRunner) getCmdHandler(cmd *exec.Cmd) (*cmdHandler, error) { 15 | ptmx, err := pty.Start(cmd) 16 | if err != nil { 17 | return nil, err 18 | } 19 | 20 | return &cmdHandler{ 21 | stdoutPipe: ptmx, 22 | stdinPipe: ptmx, 23 | close: ptmx.Close, 24 | }, nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/gobwas/glob/match/super.go: -------------------------------------------------------------------------------- 1 | package match 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type Super struct{} 8 | 9 | func NewSuper() Super { 10 | return Super{} 11 | } 12 | 13 | func (self Super) Match(s string) bool { 14 | return true 15 | } 16 | 17 | func (self Super) Len() int { 18 | return lenNo 19 | } 20 | 21 | func (self Super) Index(s string) (int, []int) { 22 | segments := acquireSegments(len(s) + 1) 23 | for i := range s { 24 | segments = append(segments, i) 25 | } 26 | segments = append(segments, len(s)) 27 | 28 | return 0, segments 29 | } 30 | 31 | func (self Super) String() string { 32 | return fmt.Sprintf("") 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/worktree_unix_other.go: -------------------------------------------------------------------------------- 1 | // +build openbsd dragonfly solaris 2 | 3 | package git 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | 9 | "github.com/jesseduffield/go-git/v5/plumbing/format/index" 10 | ) 11 | 12 | func init() { 13 | fillSystemInfo = func(e *index.Entry, sys interface{}) { 14 | if os, ok := sys.(*syscall.Stat_t); ok { 15 | e.CreatedAt = time.Unix(int64(os.Atim.Sec), int64(os.Atim.Nsec)) 16 | e.Dev = uint32(os.Dev) 17 | e.Inode = uint32(os.Ino) 18 | e.GID = os.Gid 19 | e.UID = os.Uid 20 | } 21 | } 22 | } 23 | 24 | func isSymlinkWindowsNonAdmin(err error) bool { 25 | return false 26 | } 27 | -------------------------------------------------------------------------------- /pkg/commands/models/stash_entry.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import "fmt" 4 | 5 | // StashEntry : A git stash entry 6 | type StashEntry struct { 7 | Index int 8 | Recency string 9 | Name string 10 | } 11 | 12 | func (s *StashEntry) FullRefName() string { 13 | return s.RefName() 14 | } 15 | 16 | func (s *StashEntry) RefName() string { 17 | return fmt.Sprintf("stash@{%d}", s.Index) 18 | } 19 | 20 | func (s *StashEntry) ParentRefName() string { 21 | return s.RefName() + "^" 22 | } 23 | 24 | func (s *StashEntry) ID() string { 25 | return s.RefName() 26 | } 27 | 28 | func (s *StashEntry) Description() string { 29 | return s.RefName() + ": " + s.Name 30 | } 31 | -------------------------------------------------------------------------------- /pkg/utils/once_writer.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "io" 5 | "sync" 6 | ) 7 | 8 | // This wraps a writer and ensures that before we actually write anything we call a given function first 9 | 10 | type OnceWriter struct { 11 | writer io.Writer 12 | once sync.Once 13 | f func() 14 | } 15 | 16 | var _ io.Writer = &OnceWriter{} 17 | 18 | func NewOnceWriter(writer io.Writer, f func()) *OnceWriter { 19 | return &OnceWriter{ 20 | writer: writer, 21 | f: f, 22 | } 23 | } 24 | 25 | func (self *OnceWriter) Write(p []byte) (n int, err error) { 26 | self.once.Do(func() { 27 | self.f() 28 | }) 29 | 30 | return self.writer.Write(p) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/emirpasic/gods/containers/serialization.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Emir Pasic. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package containers 6 | 7 | // JSONSerializer provides JSON serialization 8 | type JSONSerializer interface { 9 | // ToJSON outputs the JSON representation of containers's elements. 10 | ToJSON() ([]byte, error) 11 | } 12 | 13 | // JSONDeserializer provides JSON deserialization 14 | type JSONDeserializer interface { 15 | // FromJSON populates containers's elements from the input JSON representation. 16 | FromJSON([]byte) error 17 | } 18 | -------------------------------------------------------------------------------- /pkg/common/common.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/config" 5 | "github.com/jesseduffield/lazygit/pkg/i18n" 6 | "github.com/sirupsen/logrus" 7 | "github.com/spf13/afero" 8 | ) 9 | 10 | // Commonly used things wrapped into one struct for convenience when passing it around 11 | type Common struct { 12 | Log *logrus.Entry 13 | Tr *i18n.TranslationSet 14 | UserConfig *config.UserConfig 15 | AppState *config.AppState 16 | Debug bool 17 | // for interacting with the filesystem. We use afero rather than the default 18 | // `os` package for the sake of mocking the filesystem in tests 19 | Fs afero.Fs 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/atotto/clipboard/clipboard.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 @atotto. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package clipboard read/write on clipboard 6 | package clipboard 7 | 8 | // ReadAll read string from clipboard 9 | func ReadAll() (string, error) { 10 | return readAll() 11 | } 12 | 13 | // WriteAll write string to clipboard 14 | func WriteAll(text string) error { 15 | return writeAll(text) 16 | } 17 | 18 | // Unsupported might be set true during clipboard init, to help callers decide 19 | // whether or not to offer clipboard options. 20 | var Unsupported bool 21 | -------------------------------------------------------------------------------- /vendor/github.com/imdario/mergo/.gitignore: -------------------------------------------------------------------------------- 1 | #### joe made this: http://goel.io/joe 2 | 3 | #### go #### 4 | # Binaries for programs and plugins 5 | *.exe 6 | *.dll 7 | *.so 8 | *.dylib 9 | 10 | # Test binary, build with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | *.out 15 | 16 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 17 | .glide/ 18 | 19 | #### vim #### 20 | # Swap 21 | [._]*.s[a-v][a-z] 22 | [._]*.sw[a-p] 23 | [._]s[a-v][a-z] 24 | [._]sw[a-p] 25 | 26 | # Session 27 | Session.vim 28 | 29 | # Temporary 30 | .netrwhist 31 | *~ 32 | # Auto-generated tag files 33 | tags 34 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | //go:build (darwin || freebsd || openbsd || netbsd || dragonfly) && !appengine 2 | // +build darwin freebsd openbsd netbsd dragonfly 3 | // +build !appengine 4 | 5 | package isatty 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | // IsTerminal return true if the file descriptor is terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) 12 | return err == nil 13 | } 14 | 15 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 16 | // terminal. This is also always false on this environment. 17 | func IsCygwinTerminal(fd uintptr) bool { 18 | return false 19 | } 20 | -------------------------------------------------------------------------------- /pkg/commands/git_commands/custom.go: -------------------------------------------------------------------------------- 1 | package git_commands 2 | 3 | import "github.com/mgutz/str" 4 | 5 | type CustomCommands struct { 6 | *GitCommon 7 | } 8 | 9 | func NewCustomCommands(gitCommon *GitCommon) *CustomCommands { 10 | return &CustomCommands{ 11 | GitCommon: gitCommon, 12 | } 13 | } 14 | 15 | // Only to be used for the sake of running custom commands specified by the user. 16 | // If you want to run a new command, try finding a place for it in one of the neighbouring 17 | // files, or creating a new BlahCommands struct to hold it. 18 | func (self *CustomCommands) RunWithOutput(cmdStr string) (string, error) { 19 | return self.cmd.New(str.ToArgv(cmdStr)).RunWithOutput() 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/github.com/gobwas/glob/bench.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | bench() { 4 | filename="/tmp/$1-$2.bench" 5 | if test -e "${filename}"; 6 | then 7 | echo "Already exists ${filename}" 8 | else 9 | backup=`git rev-parse --abbrev-ref HEAD` 10 | git checkout $1 11 | echo -n "Creating ${filename}... " 12 | go test ./... -run=NONE -bench=$2 > "${filename}" -benchmem 13 | echo "OK" 14 | git checkout ${backup} 15 | sleep 5 16 | fi 17 | } 18 | 19 | 20 | to=$1 21 | current=`git rev-parse --abbrev-ref HEAD` 22 | 23 | bench ${to} $2 24 | bench ${current} $2 25 | 26 | benchcmp $3 "/tmp/${to}-$2.bench" "/tmp/${current}-$2.bench" 27 | -------------------------------------------------------------------------------- /pkg/gui/filetree/commit_file_node.go: -------------------------------------------------------------------------------- 1 | package filetree 2 | 3 | import "github.com/jesseduffield/lazygit/pkg/commands/models" 4 | 5 | // CommitFileNode wraps a node and provides some commit-file-specific methods for it. 6 | type CommitFileNode struct { 7 | *Node[models.CommitFile] 8 | } 9 | 10 | func NewCommitFileNode(node *Node[models.CommitFile]) *CommitFileNode { 11 | if node == nil { 12 | return nil 13 | } 14 | 15 | return &CommitFileNode{Node: node} 16 | } 17 | 18 | // returns the underlying node, without any commit-file-specific methods attached 19 | func (self *CommitFileNode) Raw() *Node[models.CommitFile] { 20 | if self == nil { 21 | return nil 22 | } 23 | 24 | return self.Node 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/go-git/gcfg/types/bool.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // BoolValues defines the name and value mappings for ParseBool. 4 | var BoolValues = map[string]interface{}{ 5 | "true": true, "yes": true, "on": true, "1": true, 6 | "false": false, "no": false, "off": false, "0": false, 7 | } 8 | 9 | var boolParser = func() *EnumParser { 10 | ep := &EnumParser{} 11 | ep.AddVals(BoolValues) 12 | return ep 13 | }() 14 | 15 | // ParseBool parses bool values according to the definitions in BoolValues. 16 | // Parsing is case-insensitive. 17 | func ParseBool(s string) (bool, error) { 18 | v, err := boolParser.Parse(s) 19 | if err != nil { 20 | return false, err 21 | } 22 | return v.(bool), nil 23 | } 24 | -------------------------------------------------------------------------------- /pkg/commands/models/commit_file.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | // CommitFile : A git commit file 4 | type CommitFile struct { 5 | // TODO: rename this to Path 6 | Name string 7 | 8 | ChangeStatus string // e.g. 'A' for added or 'M' for modified. This is based on the result from git diff --name-status 9 | } 10 | 11 | func (f *CommitFile) ID() string { 12 | return f.Name 13 | } 14 | 15 | func (f *CommitFile) Description() string { 16 | return f.Name 17 | } 18 | 19 | func (f *CommitFile) Added() bool { 20 | return f.ChangeStatus == "A" 21 | } 22 | 23 | func (f *CommitFile) Deleted() bool { 24 | return f.ChangeStatus == "D" 25 | } 26 | 27 | func (f *CommitFile) GetPath() string { 28 | return f.Name 29 | } 30 | -------------------------------------------------------------------------------- /pkg/integration/tests/demo/shared.go: -------------------------------------------------------------------------------- 1 | package demo 2 | 3 | import "github.com/jesseduffield/lazygit/pkg/config" 4 | 5 | // Gives us nicer colours when we generate a git repo history with `shell.CreateRepoHistory()` 6 | func setGeneratedAuthorColours(config *config.AppConfig) { 7 | config.UserConfig.Gui.AuthorColors = map[string]string{ 8 | "Fredrica Greenhill": "#fb5aa3", 9 | "Oscar Reuenthal": "#86c82f", 10 | "Paul Oberstein": "#ffd500", 11 | "Siegfried Kircheis": "#fe7e11", 12 | "Yang Wen-li": "#8e3ccb", 13 | } 14 | } 15 | 16 | func setDefaultDemoConfig(config *config.AppConfig) { 17 | // demos look much nicers with icons shown 18 | config.UserConfig.Gui.NerdFontsVersion = "3" 19 | } 20 | -------------------------------------------------------------------------------- /pkg/gui/presentation/icons/icons.go: -------------------------------------------------------------------------------- 1 | package icons 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/samber/lo" 7 | ) 8 | 9 | type IconProperties struct { 10 | Icon string 11 | Color uint8 12 | } 13 | 14 | var isIconEnabled = false 15 | 16 | func IsIconEnabled() bool { 17 | return isIconEnabled 18 | } 19 | 20 | func SetNerdFontsVersion(version string) { 21 | if version == "" { 22 | isIconEnabled = false 23 | } else { 24 | if !lo.Contains([]string{"2", "3"}, version) { 25 | log.Fatalf("Unsupported nerdFontVersion %s", version) 26 | } 27 | 28 | if version == "2" { 29 | patchGitIconsForNerdFontsV2() 30 | patchFileIconsForNerdFontsV2() 31 | } 32 | 33 | isIconEnabled = true 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | //go:build solaris && !appengine 2 | // +build solaris,!appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | _, err := unix.IoctlGetTermio(int(fd), unix.TCGETA) 14 | return err == nil 15 | } 16 | 17 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 18 | // terminal. This is also always false on this environment. 19 | func IsCygwinTerminal(fd uintptr) bool { 20 | return false 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gobwas/glob/match/suffix.go: -------------------------------------------------------------------------------- 1 | package match 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | type Suffix struct { 9 | Suffix string 10 | } 11 | 12 | func NewSuffix(s string) Suffix { 13 | return Suffix{s} 14 | } 15 | 16 | func (self Suffix) Len() int { 17 | return lenNo 18 | } 19 | 20 | func (self Suffix) Match(s string) bool { 21 | return strings.HasSuffix(s, self.Suffix) 22 | } 23 | 24 | func (self Suffix) Index(s string) (int, []int) { 25 | idx := strings.Index(s, self.Suffix) 26 | if idx == -1 { 27 | return -1, nil 28 | } 29 | 30 | return 0, []int{idx + len(self.Suffix)} 31 | } 32 | 33 | func (self Suffix) String() string { 34 | return fmt.Sprintf("", self.Suffix) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/env_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Plan 9 environment variables. 6 | 7 | package plan9 8 | 9 | import ( 10 | "syscall" 11 | ) 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /pkg/commands/models/remote_branch.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | // Remote Branch : A git remote branch 4 | type RemoteBranch struct { 5 | Name string 6 | RemoteName string 7 | } 8 | 9 | func (r *RemoteBranch) FullName() string { 10 | return r.RemoteName + "/" + r.Name 11 | } 12 | 13 | func (r *RemoteBranch) FullRefName() string { 14 | return "refs/remotes/" + r.FullName() 15 | } 16 | 17 | func (r *RemoteBranch) RefName() string { 18 | return r.FullName() 19 | } 20 | 21 | func (r *RemoteBranch) ParentRefName() string { 22 | return r.RefName() + "^" 23 | } 24 | 25 | func (r *RemoteBranch) ID() string { 26 | return r.RefName() 27 | } 28 | 29 | func (r *RemoteBranch) Description() string { 30 | return r.RefName() 31 | } 32 | -------------------------------------------------------------------------------- /pkg/logs/tail/tail.go: -------------------------------------------------------------------------------- 1 | package tail 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "os" 7 | 8 | "github.com/aybabtme/humanlog" 9 | ) 10 | 11 | // TailLogs lets us run `lazygit --logs` to print the logs produced by other lazygit processes. 12 | // This makes for easier debugging. 13 | func TailLogs(logFilePath string) { 14 | fmt.Printf("Tailing log file %s\n\n", logFilePath) 15 | 16 | opts := humanlog.DefaultOptions 17 | opts.Truncates = false 18 | 19 | _, err := os.Stat(logFilePath) 20 | if err != nil { 21 | if os.IsNotExist(err) { 22 | log.Fatal("Log file does not exist. Run `lazygit --debug` first to create the log file") 23 | } 24 | log.Fatal(err) 25 | } 26 | 27 | tailLogsForPlatform(logFilePath, opts) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /pkg/commands/types/enums/enums.go: -------------------------------------------------------------------------------- 1 | package enums 2 | 3 | type RebaseMode int 4 | 5 | const ( 6 | // this means we're neither rebasing nor merging 7 | REBASE_MODE_NONE RebaseMode = iota 8 | // this means normal rebase as opposed to interactive rebase 9 | REBASE_MODE_NORMAL 10 | REBASE_MODE_INTERACTIVE 11 | // REBASE_MODE_REBASING is a general state that captures both REBASE_MODE_NORMAL and REBASE_MODE_INTERACTIVE 12 | REBASE_MODE_REBASING 13 | REBASE_MODE_MERGING 14 | ) 15 | 16 | func (self RebaseMode) IsMerging() bool { 17 | return self == REBASE_MODE_MERGING 18 | } 19 | 20 | func (self RebaseMode) IsRebasing() bool { 21 | return self == REBASE_MODE_INTERACTIVE || self == REBASE_MODE_NORMAL || self == REBASE_MODE_REBASING 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/petermattis/goid/runtime_go1.9.go: -------------------------------------------------------------------------------- 1 | // +build gc,go1.9 2 | 3 | package goid 4 | 5 | type stack struct { 6 | lo uintptr 7 | hi uintptr 8 | } 9 | 10 | type gobuf struct { 11 | sp uintptr 12 | pc uintptr 13 | g uintptr 14 | ctxt uintptr 15 | ret uintptr 16 | lr uintptr 17 | bp uintptr 18 | } 19 | 20 | type g struct { 21 | stack stack 22 | stackguard0 uintptr 23 | stackguard1 uintptr 24 | 25 | _panic uintptr 26 | _defer uintptr 27 | m uintptr 28 | sched gobuf 29 | syscallsp uintptr 30 | syscallpc uintptr 31 | stktopsp uintptr 32 | param uintptr 33 | atomicstatus uint32 34 | stackLock uint32 35 | goid int64 // Here it is! 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | set -euo pipefail 3 | 4 | cd "$(git rev-parse --show-toplevel)" 5 | 6 | STD_PATH=src/crypto/ed25519/internal/edwards25519/field 7 | LOCAL_PATH=curve25519/internal/field 8 | LAST_SYNC_REF=$(cat $LOCAL_PATH/sync.checkpoint) 9 | 10 | git fetch https://go.googlesource.com/go master 11 | 12 | if git diff --quiet $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH; then 13 | echo "No changes." 14 | else 15 | NEW_REF=$(git rev-parse FETCH_HEAD | tee $LOCAL_PATH/sync.checkpoint) 16 | echo "Applying changes from $LAST_SYNC_REF to $NEW_REF..." 17 | git diff $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH | \ 18 | git apply -3 --directory=$LOCAL_PATH 19 | fi 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_x86.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (386 || amd64 || amd64p32) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 10 | TEXT ·cpuid(SB), NOSPLIT, $0-24 11 | MOVL eaxArg+0(FP), AX 12 | MOVL ecxArg+4(FP), CX 13 | CPUID 14 | MOVL AX, eax+8(FP) 15 | MOVL BX, ebx+12(FP) 16 | MOVL CX, ecx+16(FP) 17 | MOVL DX, edx+20(FP) 18 | RET 19 | 20 | // func xgetbv() (eax, edx uint32) 21 | TEXT ·xgetbv(SB),NOSPLIT,$0-8 22 | MOVL $0, CX 23 | XGETBV 24 | MOVL AX, eax+0(FP) 25 | MOVL DX, edx+4(FP) 26 | RET 27 | -------------------------------------------------------------------------------- /pkg/commands/git_config/fake_git_config.go: -------------------------------------------------------------------------------- 1 | package git_config 2 | 3 | type FakeGitConfig struct { 4 | mockResponses map[string]string 5 | } 6 | 7 | func NewFakeGitConfig(mockResponses map[string]string) *FakeGitConfig { 8 | return &FakeGitConfig{ 9 | mockResponses: mockResponses, 10 | } 11 | } 12 | 13 | func (self *FakeGitConfig) Get(key string) string { 14 | if self.mockResponses == nil { 15 | return "" 16 | } 17 | return self.mockResponses[key] 18 | } 19 | 20 | func (self *FakeGitConfig) GetGeneral(args string) string { 21 | if self.mockResponses == nil { 22 | return "" 23 | } 24 | return self.mockResponses[args] 25 | } 26 | 27 | func (self *FakeGitConfig) GetBool(key string) bool { 28 | return isTruthy(self.Get(key)) 29 | } 30 | -------------------------------------------------------------------------------- /pkg/commands/models/tag.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | // Tag : A git tag 4 | type Tag struct { 5 | Name string 6 | // this is either the first line of the message of an annotated tag, or the 7 | // first line of a commit message for a lightweight tag 8 | Message string 9 | } 10 | 11 | func (t *Tag) FullRefName() string { 12 | return "refs/tags/" + t.RefName() 13 | } 14 | 15 | func (t *Tag) RefName() string { 16 | return t.Name 17 | } 18 | 19 | func (t *Tag) ParentRefName() string { 20 | return t.RefName() + "^" 21 | } 22 | 23 | func (t *Tag) ID() string { 24 | return t.RefName() 25 | } 26 | 27 | func (t *Tag) URN() string { 28 | return "tag-" + t.ID() 29 | } 30 | 31 | func (t *Tag) Description() string { 32 | return t.Message 33 | } 34 | -------------------------------------------------------------------------------- /pkg/integration/tests/status/click_repo_name_to_open_repos_menu.go: -------------------------------------------------------------------------------- 1 | package status 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/config" 5 | . "github.com/jesseduffield/lazygit/pkg/integration/components" 6 | ) 7 | 8 | var ClickRepoNameToOpenReposMenu = NewIntegrationTest(NewIntegrationTestArgs{ 9 | Description: "Click on the repo name in the status side panel to open the recent repositories menu", 10 | ExtraCmdArgs: []string{}, 11 | Skip: false, 12 | SetupConfig: func(config *config.AppConfig) {}, 13 | SetupRepo: func(shell *Shell) {}, 14 | Run: func(t *TestDriver, keys config.KeybindingConfig) { 15 | t.Views().Status().Click(1, 0) 16 | t.ExpectPopup().Menu().Title(Equals("Recent repositories")) 17 | }, 18 | }) 19 | -------------------------------------------------------------------------------- /vendor/github.com/integrii/flaggy/positionalValue.go: -------------------------------------------------------------------------------- 1 | package flaggy 2 | 3 | // PositionalValue represents a value which is determined by its position 4 | // relative to where a subcommand was detected. 5 | type PositionalValue struct { 6 | Name string // used in documentation only 7 | Description string 8 | AssignmentVar *string // the var that will get this variable 9 | Position int // the position, not including switches, of this variable 10 | Required bool // this subcommand must always be specified 11 | Found bool // was this positional found during parsing? 12 | Hidden bool // indicates this positional value should be hidden from help 13 | defaultValue string // used for help output 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build plan9 && race 6 | 7 | package plan9 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /pkg/gui/context/parent_context_mgr.go: -------------------------------------------------------------------------------- 1 | package context 2 | 3 | import "github.com/jesseduffield/lazygit/pkg/gui/types" 4 | 5 | type ParentContextMgr struct { 6 | ParentContext types.Context 7 | // we can't know on the calling end whether a Context is actually a nil value without reflection, so we're storing this flag here to tell us. There has got to be a better way around this 8 | hasParent bool 9 | } 10 | 11 | var _ types.ParentContexter = (*ParentContextMgr)(nil) 12 | 13 | func (self *ParentContextMgr) SetParentContext(context types.Context) { 14 | self.ParentContext = context 15 | self.hasParent = true 16 | } 17 | 18 | func (self *ParentContextMgr) GetParentContext() (types.Context, bool) { 19 | return self.ParentContext, self.hasParent 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-git/gcfg/types/scan.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "reflect" 7 | ) 8 | 9 | // ScanFully uses fmt.Sscanf with verb to fully scan val into ptr. 10 | func ScanFully(ptr interface{}, val string, verb byte) error { 11 | t := reflect.ValueOf(ptr).Elem().Type() 12 | // attempt to read extra bytes to make sure the value is consumed 13 | var b []byte 14 | n, err := fmt.Sscanf(val, "%"+string(verb)+"%s", ptr, &b) 15 | switch { 16 | case n < 1 || n == 1 && err != io.EOF: 17 | return fmt.Errorf("failed to parse %q as %v: %v", val, t, err) 18 | case n > 1: 19 | return fmt.Errorf("failed to parse %q as %v: extra characters %q", val, t, string(b)) 20 | } 21 | // n == 1 && err == io.EOF 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /pkg/gui/modes/diffing/diffing.go: -------------------------------------------------------------------------------- 1 | package diffing 2 | 3 | // if ref is blank we're not diffing anything 4 | type Diffing struct { 5 | Ref string 6 | Reverse bool 7 | } 8 | 9 | func New() Diffing { 10 | return Diffing{} 11 | } 12 | 13 | func (self *Diffing) Active() bool { 14 | return self.Ref != "" 15 | } 16 | 17 | // GetFromAndReverseArgsForDiff tells us the from and reverse args to be used in a diff command. 18 | // If we're not in diff mode we'll end up with the equivalent of a `git show` i.e `git diff blah^..blah`. 19 | func (self *Diffing) GetFromAndReverseArgsForDiff(from string) (string, bool) { 20 | reverse := false 21 | 22 | if self.Active() { 23 | reverse = self.Reverse 24 | from = self.Ref 25 | } 26 | 27 | return from, reverse 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/adrg/xdg/internal/pathutil/pathutil_plan9.go: -------------------------------------------------------------------------------- 1 | package pathutil 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | "strings" 7 | ) 8 | 9 | // Exists returns true if the specified path exists. 10 | func Exists(path string) bool { 11 | _, err := os.Stat(path) 12 | return err == nil || os.IsExist(err) 13 | } 14 | 15 | // ExpandHome substitutes `~` and `$home` at the start of the specified 16 | // `path` using the provided `home` location. 17 | func ExpandHome(path, home string) string { 18 | if path == "" || home == "" { 19 | return path 20 | } 21 | if path[0] == '~' { 22 | return filepath.Join(home, path[1:]) 23 | } 24 | if strings.HasPrefix(path, "$home") { 25 | return filepath.Join(home, path[5:]) 26 | } 27 | 28 | return path 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/worktree_plan9.go: -------------------------------------------------------------------------------- 1 | package git 2 | 3 | import ( 4 | "syscall" 5 | "time" 6 | 7 | "github.com/jesseduffield/go-git/v5/plumbing/format/index" 8 | ) 9 | 10 | func init() { 11 | fillSystemInfo = func(e *index.Entry, sys interface{}) { 12 | if os, ok := sys.(*syscall.Dir); ok { 13 | // Plan 9 doesn't have a CreatedAt field. 14 | e.CreatedAt = time.Unix(int64(os.Mtime), 0) 15 | 16 | e.Dev = uint32(os.Dev) 17 | 18 | // Plan 9 has no Inode. 19 | // ext2srv(4) appears to store Inode in Qid.Path. 20 | e.Inode = uint32(os.Qid.Path) 21 | 22 | // Plan 9 has string UID/GID 23 | e.GID = 0 24 | e.UID = 0 25 | } 26 | } 27 | } 28 | 29 | func isSymlinkWindowsNonAdmin(err error) bool { 30 | return true 31 | } 32 | -------------------------------------------------------------------------------- /scripts/check_for_fixups.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | base_ref=$1 4 | 5 | # Determine the base commit 6 | base_commit=$(git merge-base HEAD origin/"$base_ref") 7 | 8 | # Check if base_commit is set correctly 9 | if [ -z "$base_commit" ]; then 10 | echo "Failed to determine base commit." 11 | exit 1 12 | fi 13 | echo "Base commit: $base_commit" 14 | 15 | # Get commits with "fixup!" in the message from base_commit to HEAD 16 | commits=$(git log -i -E --grep '^fixup!' --grep '^squash!' --grep '^amend!' --grep '^[^\n]*WIP' --grep '^[^\n]*DROPME' --format="%h %s" "$base_commit..HEAD") 17 | 18 | if [ -z "$commits" ]; then 19 | echo "No fixup commits found." 20 | exit 0 21 | else 22 | echo "Fixup or WIP commits found:" 23 | echo "$commits" 24 | exit 1 25 | fi 26 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-homedir/README.md: -------------------------------------------------------------------------------- 1 | # go-homedir 2 | 3 | This is a Go library for detecting the user's home directory without 4 | the use of cgo, so the library can be used in cross-compilation environments. 5 | 6 | Usage is incredibly simple, just call `homedir.Dir()` to get the home directory 7 | for a user, and `homedir.Expand()` to expand the `~` in a path to the home 8 | directory. 9 | 10 | **Why not just use `os/user`?** The built-in `os/user` package requires 11 | cgo on Darwin systems. This means that any Go code that uses that package 12 | cannot cross compile. But 99% of the time the use for `os/user` is just to 13 | retrieve the home directory, which we can do for the current user without 14 | cgo. This library does that, enabling cross-compilation. 15 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "syscall" 9 | 10 | sequences "github.com/konsorten/go-windows-terminal-sequences" 11 | ) 12 | 13 | func initTerminal(w io.Writer) { 14 | switch v := w.(type) { 15 | case *os.File: 16 | sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true) 17 | } 18 | } 19 | 20 | func checkIfTerminal(w io.Writer) bool { 21 | var ret bool 22 | switch v := w.(type) { 23 | case *os.File: 24 | var mode uint32 25 | err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode) 26 | ret = (err == nil) 27 | default: 28 | ret = false 29 | } 30 | if ret { 31 | initTerminal(w) 32 | } 33 | return ret 34 | } 35 | -------------------------------------------------------------------------------- /test/files/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # test pre-push hook for testing the lazygit credentials view 4 | # 5 | # to enable, use: 6 | # chmod +x .git/hooks/pre-push 7 | # 8 | # this will hang if you're using git from the command line, so only enable this 9 | # when you are testing the credentials view in lazygit 10 | 11 | exec < /dev/tty 12 | 13 | echo -n "Username for 'github': " 14 | read username 15 | 16 | echo -n "Password for 'github': " 17 | # this will print the password to the log view but real git won't do that. 18 | # We could use read -s but that's not POSIX compliant. 19 | read password 20 | 21 | if [ "$username" = "username" -a "$password" = "password" ]; then 22 | echo "success" 23 | exit 0 24 | fi 25 | 26 | >&2 echo "incorrect username/password" 27 | exit 1 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // System call support for plan9 on arm 8 | 9 | // Just jump to package syscall's implementation for all these functions. 10 | // The runtime may know about them. 11 | 12 | TEXT ·Syscall(SB),NOSPLIT,$0-32 13 | JMP syscall·Syscall(SB) 14 | 15 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 16 | JMP syscall·Syscall6(SB) 17 | 18 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 19 | JMP syscall·RawSyscall(SB) 20 | 21 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 22 | JMP syscall·RawSyscall6(SB) 23 | 24 | TEXT ·seek(SB),NOSPLIT,$0-36 25 | JMP syscall·exit(SB) 26 | -------------------------------------------------------------------------------- /pkg/gui/controllers/helpers/view_helper.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/gui/context" 5 | "github.com/jesseduffield/lazygit/pkg/gui/types" 6 | ) 7 | 8 | type ViewHelper struct { 9 | c *HelperCommon 10 | } 11 | 12 | func NewViewHelper(c *HelperCommon, contexts *context.ContextTree) *ViewHelper { 13 | return &ViewHelper{ 14 | c: c, 15 | } 16 | } 17 | 18 | func (self *ViewHelper) ContextForView(viewName string) (types.Context, bool) { 19 | view, err := self.c.GocuiGui().View(viewName) 20 | if err != nil { 21 | return nil, false 22 | } 23 | 24 | for _, context := range self.c.Contexts().Flatten() { 25 | if context.GetViewName() == view.Name() { 26 | return context, true 27 | } 28 | } 29 | 30 | return nil, false 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/gobwas/glob/util/strings/strings.go: -------------------------------------------------------------------------------- 1 | package strings 2 | 3 | import ( 4 | "strings" 5 | "unicode/utf8" 6 | ) 7 | 8 | func IndexAnyRunes(s string, rs []rune) int { 9 | for _, r := range rs { 10 | if i := strings.IndexRune(s, r); i != -1 { 11 | return i 12 | } 13 | } 14 | 15 | return -1 16 | } 17 | 18 | func LastIndexAnyRunes(s string, rs []rune) int { 19 | for _, r := range rs { 20 | i := -1 21 | if 0 <= r && r < utf8.RuneSelf { 22 | i = strings.LastIndexByte(s, byte(r)) 23 | } else { 24 | sub := s 25 | for len(sub) > 0 { 26 | j := strings.IndexRune(s, r) 27 | if j == -1 { 28 | break 29 | } 30 | i = j 31 | sub = sub[i+1:] 32 | } 33 | } 34 | if i != -1 { 35 | return i 36 | } 37 | } 38 | return -1 39 | } 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_aix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix 6 | 7 | package cpu 8 | 9 | const ( 10 | // getsystemcfg constants 11 | _SC_IMPL = 2 12 | _IMPL_POWER8 = 0x10000 13 | _IMPL_POWER9 = 0x20000 14 | ) 15 | 16 | func archInit() { 17 | impl := getsystemcfg(_SC_IMPL) 18 | if impl&_IMPL_POWER8 != 0 { 19 | PPC64.IsPOWER8 = true 20 | } 21 | if impl&_IMPL_POWER9 != 0 { 22 | PPC64.IsPOWER8 = true 23 | PPC64.IsPOWER9 = true 24 | } 25 | 26 | Initialized = true 27 | } 28 | 29 | func getsystemcfg(label int) (n uint64) { 30 | r0, _ := callgetsystemcfg(label) 31 | n = uint64(r0) 32 | return 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | func initS390Xbase() { 8 | // get the facilities list 9 | facilities := stfle() 10 | 11 | // mandatory 12 | S390X.HasZARCH = facilities.Has(zarch) 13 | S390X.HasSTFLE = facilities.Has(stflef) 14 | S390X.HasLDISP = facilities.Has(ldisp) 15 | S390X.HasEIMM = facilities.Has(eimm) 16 | 17 | // optional 18 | S390X.HasETF3EH = facilities.Has(etf3eh) 19 | S390X.HasDFP = facilities.Has(dfp) 20 | S390X.HasMSA = facilities.Has(msa) 21 | S390X.HasVX = facilities.Has(vx) 22 | if S390X.HasVX { 23 | S390X.HasVXE = facilities.Has(vxe) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | # adapted from https://github.com/devcontainers/images/blob/main/src/go/.devcontainer/Dockerfile 2 | 3 | # [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.19, 1.18, 1-bullseye, 1.19-bullseye, 1.18-bullseye, 1-buster, 1.19-buster, 1.18-buster 4 | ARG VARIANT=1-bullseye 5 | FROM golang:${VARIANT} 6 | 7 | RUN go install mvdan.cc/gofumpt@latest 8 | RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.0 9 | RUN golangci-lint --version 10 | 11 | # [Optional] Uncomment this section to install additional OS packages. 12 | # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 13 | # && apt-get -y install --no-install-recommends 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/Makefile: -------------------------------------------------------------------------------- 1 | BUMP_VERSION := $(GOPATH)/bin/bump_version 2 | STATICCHECK := $(GOPATH)/bin/staticcheck 3 | WRITE_MAILMAP := $(GOPATH)/bin/write_mailmap 4 | 5 | $(STATICCHECK): 6 | go get honnef.co/go/tools/cmd/staticcheck 7 | 8 | lint: $(STATICCHECK) 9 | go vet ./... 10 | $(STATICCHECK) 11 | 12 | test: lint 13 | @# the timeout helps guard against infinite recursion 14 | go test -timeout=250ms ./... 15 | 16 | race-test: lint 17 | go test -timeout=500ms -race ./... 18 | 19 | $(BUMP_VERSION): 20 | go get -u github.com/kevinburke/bump_version 21 | 22 | release: test | $(BUMP_VERSION) 23 | $(BUMP_VERSION) minor config.go 24 | 25 | force: ; 26 | 27 | AUTHORS.txt: force | $(WRITE_MAILMAP) 28 | $(WRITE_MAILMAP) > AUTHORS.txt 29 | 30 | authors: AUTHORS.txt 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | package cpu 8 | 9 | // haveAsmFunctions reports whether the other functions in this file can 10 | // be safely called. 11 | func haveAsmFunctions() bool { return true } 12 | 13 | // The following feature detection functions are defined in cpu_s390x.s. 14 | // They are likely to be expensive to call so the results should be cached. 15 | func stfle() facilityList 16 | func kmQuery() queryResult 17 | func kmcQuery() queryResult 18 | func kmctrQuery() queryResult 19 | func kmaQuery() queryResult 20 | func kimdQuery() queryResult 21 | func klmdQuery() queryResult 22 | -------------------------------------------------------------------------------- /vendor/github.com/creack/pty/ioctl_solaris.go: -------------------------------------------------------------------------------- 1 | package pty 2 | 3 | import ( 4 | "golang.org/x/sys/unix" 5 | "unsafe" 6 | ) 7 | 8 | const ( 9 | // see /usr/include/sys/stropts.h 10 | I_PUSH = uintptr((int32('S')<<8 | 002)) 11 | I_STR = uintptr((int32('S')<<8 | 010)) 12 | I_FIND = uintptr((int32('S')<<8 | 013)) 13 | // see /usr/include/sys/ptms.h 14 | ISPTM = (int32('P') << 8) | 1 15 | UNLKPT = (int32('P') << 8) | 2 16 | PTSSTTY = (int32('P') << 8) | 3 17 | ZONEPT = (int32('P') << 8) | 4 18 | OWNERPT = (int32('P') << 8) | 5 19 | ) 20 | 21 | type strioctl struct { 22 | ic_cmd int32 23 | ic_timout int32 24 | ic_len int32 25 | ic_dp unsafe.Pointer 26 | } 27 | 28 | func ioctl(fd, cmd, ptr uintptr) error { 29 | return unix.IoctlSetInt(int(fd), uint(cmd), int(ptr)) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/plumbing/error.go: -------------------------------------------------------------------------------- 1 | package plumbing 2 | 3 | import "fmt" 4 | 5 | type PermanentError struct { 6 | Err error 7 | } 8 | 9 | func NewPermanentError(err error) *PermanentError { 10 | if err == nil { 11 | return nil 12 | } 13 | 14 | return &PermanentError{Err: err} 15 | } 16 | 17 | func (e *PermanentError) Error() string { 18 | return fmt.Sprintf("permanent client error: %s", e.Err.Error()) 19 | } 20 | 21 | type UnexpectedError struct { 22 | Err error 23 | } 24 | 25 | func NewUnexpectedError(err error) *UnexpectedError { 26 | if err == nil { 27 | return nil 28 | } 29 | 30 | return &UnexpectedError{Err: err} 31 | } 32 | 33 | func (e *UnexpectedError) Error() string { 34 | return fmt.Sprintf("unexpected client error: %s", e.Err.Error()) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build hurd 6 | 7 | package unix 8 | 9 | /* 10 | #include 11 | int ioctl(int, unsigned long int, uintptr_t); 12 | */ 13 | import "C" 14 | 15 | func ioctl(fd int, req uint, arg uintptr) (err error) { 16 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) 17 | if r0 == -1 && er != nil { 18 | err = er 19 | } 20 | return 21 | } 22 | 23 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { 24 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg))) 25 | if r0 == -1 && er != nil { 26 | err = er 27 | } 28 | return 29 | } 30 | -------------------------------------------------------------------------------- /pkg/integration/tests/misc/initial_open.go: -------------------------------------------------------------------------------- 1 | package misc 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/config" 5 | . "github.com/jesseduffield/lazygit/pkg/integration/components" 6 | ) 7 | 8 | var InitialOpen = NewIntegrationTest(NewIntegrationTestArgs{ 9 | Description: "Confirms a popup appears on first opening Lazygit", 10 | ExtraCmdArgs: []string{}, 11 | Skip: false, 12 | SetupConfig: func(config *config.AppConfig) { 13 | config.UserConfig.DisableStartupPopups = false 14 | }, 15 | SetupRepo: func(shell *Shell) {}, 16 | Run: func(t *TestDriver, keys config.KeybindingConfig) { 17 | t.ExpectPopup().Confirmation(). 18 | Title(Equals("")). 19 | Content(Contains("Thanks for using lazygit!")). 20 | Confirm() 21 | 22 | t.Views().Files().IsFocused() 23 | }, 24 | }) 25 | -------------------------------------------------------------------------------- /vendor/github.com/emirpasic/gods/trees/binaryheap/serialization.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Emir Pasic. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binaryheap 6 | 7 | import "github.com/emirpasic/gods/containers" 8 | 9 | func assertSerializationImplementation() { 10 | var _ containers.JSONSerializer = (*Heap)(nil) 11 | var _ containers.JSONDeserializer = (*Heap)(nil) 12 | } 13 | 14 | // ToJSON outputs the JSON representation of the heap. 15 | func (heap *Heap) ToJSON() ([]byte, error) { 16 | return heap.list.ToJSON() 17 | } 18 | 19 | // FromJSON populates the heap from the input JSON representation. 20 | func (heap *Heap) FromJSON(data []byte) error { 21 | return heap.list.FromJSON(data) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mgutz/str/doc.go: -------------------------------------------------------------------------------- 1 | // Package str is a comprehensive set of string functions to build more 2 | // Go awesomeness. Str complements Go's standard packages and does not duplicate 3 | // functionality found in `strings` or `strconv`. 4 | // 5 | // Str is based on plain functions instead of object-based methods, 6 | // consistent with Go standard string packages. 7 | // 8 | // str.Between("foo", "", "") == "foo" 9 | // 10 | // Str supports pipelining instead of chaining 11 | // 12 | // s := str.Pipe("\nabcdef\n", Clean, BetweenF("a", "f"), ChompLeftF("bc")) 13 | // 14 | // User-defined filters can be added to the pipeline by inserting a function 15 | // or closure that returns a function with this signature 16 | // 17 | // func(string) string 18 | // 19 | package str 20 | -------------------------------------------------------------------------------- /pkg/integration/tests/ui/switch_tab_from_menu.go: -------------------------------------------------------------------------------- 1 | package ui 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/config" 5 | . "github.com/jesseduffield/lazygit/pkg/integration/components" 6 | ) 7 | 8 | var SwitchTabFromMenu = NewIntegrationTest(NewIntegrationTestArgs{ 9 | Description: "Switch tab via the options menu", 10 | ExtraCmdArgs: []string{}, 11 | Skip: false, 12 | SetupConfig: func(config *config.AppConfig) {}, 13 | SetupRepo: func(shell *Shell) { 14 | }, 15 | Run: func(t *TestDriver, keys config.KeybindingConfig) { 16 | t.Views().Files().IsFocused(). 17 | Press(keys.Universal.OptionMenuAlt1) 18 | 19 | t.ExpectPopup().Menu().Title(Equals("Keybindings")). 20 | Select(Contains("Next tab")). 21 | Confirm() 22 | 23 | t.Views().Worktrees().IsFocused() 24 | }, 25 | }) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.9 6 | // +build go1.9 7 | 8 | package context 9 | 10 | import "context" // standard library's context, as of Go 1.7 11 | 12 | // A Context carries a deadline, a cancelation signal, and other values across 13 | // API boundaries. 14 | // 15 | // Context's methods may be called by multiple goroutines simultaneously. 16 | type Context = context.Context 17 | 18 | // A CancelFunc tells an operation to abandon its work. 19 | // A CancelFunc does not wait for the work to stop. 20 | // After the first call, subsequent calls to a CancelFunc do nothing. 21 | type CancelFunc = context.CancelFunc 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /pkg/commands/patch/patch_line.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | import "github.com/samber/lo" 4 | 5 | type PatchLineKind int 6 | 7 | const ( 8 | PATCH_HEADER PatchLineKind = iota 9 | HUNK_HEADER 10 | ADDITION 11 | DELETION 12 | CONTEXT 13 | NEWLINE_MESSAGE 14 | ) 15 | 16 | type PatchLine struct { 17 | Kind PatchLineKind 18 | Content string // something like '+ hello' (note the first character is not removed) 19 | } 20 | 21 | func (self *PatchLine) isChange() bool { 22 | return self.Kind == ADDITION || self.Kind == DELETION 23 | } 24 | 25 | // Returns the number of lines in the given slice that have one of the given kinds 26 | func nLinesWithKind(lines []*PatchLine, kinds []PatchLineKind) int { 27 | return lo.CountBy(lines, func(line *PatchLine) bool { 28 | return lo.Contains(kinds, line.Kind) 29 | }) 30 | } 31 | -------------------------------------------------------------------------------- /pkg/gui/style/color.go: -------------------------------------------------------------------------------- 1 | package style 2 | 3 | import "github.com/gookit/color" 4 | 5 | type Color struct { 6 | rgb *color.RGBColor 7 | basic *color.Color 8 | } 9 | 10 | func NewRGBColor(cl color.RGBColor) Color { 11 | c := Color{} 12 | c.rgb = &cl 13 | return c 14 | } 15 | 16 | func NewBasicColor(cl color.Color) Color { 17 | c := Color{} 18 | c.basic = &cl 19 | return c 20 | } 21 | 22 | func (c Color) IsRGB() bool { 23 | return c.rgb != nil 24 | } 25 | 26 | func (c Color) ToRGB(isBg bool) Color { 27 | if c.IsRGB() { 28 | return c 29 | } 30 | 31 | if isBg { 32 | // We need to convert bg color to fg color 33 | // This is a gookit/color bug, 34 | // https://github.com/gookit/color/issues/39 35 | return NewRGBColor((*c.basic - 10).RGB()) 36 | } 37 | 38 | return NewRGBColor(c.basic.RGB()) 39 | } 40 | -------------------------------------------------------------------------------- /pkg/integration/tests/config/remote_named_star.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/config" 5 | . "github.com/jesseduffield/lazygit/pkg/integration/components" 6 | ) 7 | 8 | var RemoteNamedStar = NewIntegrationTest(NewIntegrationTestArgs{ 9 | Description: "Having a config remote.*", 10 | ExtraCmdArgs: []string{}, 11 | Skip: false, 12 | SetupRepo: func(shell *Shell) { 13 | shell. 14 | SetConfig("remote.*.prune", "true"). 15 | CreateNCommits(2) 16 | }, 17 | SetupConfig: func(cfg *config.AppConfig) {}, 18 | Run: func(t *TestDriver, keys config.KeybindingConfig) { 19 | // here we're just asserting that we haven't panicked upon starting lazygit 20 | t.Views().Commits(). 21 | Lines( 22 | AnyString(), 23 | AnyString(), 24 | ) 25 | }, 26 | }) 27 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/encoding/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Garrett D'Amore 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package encoding provides a few of the encoding structures that are 16 | // missing from the Go x/text/encoding tree. 17 | package encoding 18 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/v2/charset_stub.go: -------------------------------------------------------------------------------- 1 | //go:build plan9 || nacl 2 | // +build plan9 nacl 3 | 4 | // Copyright 2015 The TCell Authors 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use file except in compliance with the License. 8 | // You may obtain a copy of the license at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | package tcell 19 | 20 | func getCharset() string { 21 | return "" 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/v2/charset_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | // Copyright 2015 The TCell Authors 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use file except in compliance with the License. 8 | // You may obtain a copy of the license at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | package tcell 19 | 20 | func getCharset() string { 21 | return "UTF-16" 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | B syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | B syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | B syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || zos 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/README.md: -------------------------------------------------------------------------------- 1 | # Go terminal/console support 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/term.svg)](https://pkg.go.dev/golang.org/x/term) 4 | 5 | This repository provides Go terminal and console support packages. 6 | 7 | ## Download/Install 8 | 9 | The easiest way to install is to run `go get -u golang.org/x/term`. You can 10 | also manually git clone the repository to `$GOPATH/src/golang.org/x/term`. 11 | 12 | ## Report Issues / Send Patches 13 | 14 | This repository uses Gerrit for code changes. To learn how to submit changes to 15 | this repository, see https://golang.org/doc/contribute.html. 16 | 17 | The main issue tracker for the term repository is located at 18 | https://github.com/golang/go/issues. Prefix your issue with "x/term:" in the 19 | subject line, so it is easy to find. 20 | -------------------------------------------------------------------------------- /pkg/integration/tests/misc/confirm_on_quit.go: -------------------------------------------------------------------------------- 1 | package misc 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/config" 5 | . "github.com/jesseduffield/lazygit/pkg/integration/components" 6 | ) 7 | 8 | var ConfirmOnQuit = NewIntegrationTest(NewIntegrationTestArgs{ 9 | Description: "Quitting with a confirm prompt", 10 | ExtraCmdArgs: []string{}, 11 | Skip: false, 12 | SetupConfig: func(config *config.AppConfig) { 13 | config.UserConfig.ConfirmOnQuit = true 14 | }, 15 | SetupRepo: func(shell *Shell) {}, 16 | Run: func(t *TestDriver, keys config.KeybindingConfig) { 17 | t.Views().Files(). 18 | IsFocused(). 19 | Press(keys.Universal.Quit) 20 | 21 | t.ExpectPopup().Confirmation(). 22 | Title(Equals("")). 23 | Content(Contains("Are you sure you want to quit?")). 24 | Confirm() 25 | }, 26 | }) 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for mips64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /pkg/gui/presentation/item_operations.go: -------------------------------------------------------------------------------- 1 | package presentation 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/gui/types" 5 | "github.com/jesseduffield/lazygit/pkg/i18n" 6 | ) 7 | 8 | func ItemOperationToString(itemOperation types.ItemOperation, tr *i18n.TranslationSet) string { 9 | switch itemOperation { 10 | case types.ItemOperationNone: 11 | return "" 12 | case types.ItemOperationPushing: 13 | return tr.PushingStatus 14 | case types.ItemOperationPulling: 15 | return tr.PullingStatus 16 | case types.ItemOperationFastForwarding: 17 | return tr.FastForwarding 18 | case types.ItemOperationDeleting: 19 | return tr.DeletingStatus 20 | case types.ItemOperationFetching: 21 | return tr.FetchingStatus 22 | case types.ItemOperationCheckingOut: 23 | return tr.CheckingOutStatus 24 | } 25 | 26 | return "" 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for 386 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /pkg/gui/presentation/submodules.go: -------------------------------------------------------------------------------- 1 | package presentation 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/commands/models" 5 | "github.com/jesseduffield/lazygit/pkg/theme" 6 | "github.com/samber/lo" 7 | ) 8 | 9 | func GetSubmoduleListDisplayStrings(submodules []*models.SubmoduleConfig) [][]string { 10 | return lo.Map(submodules, func(submodule *models.SubmoduleConfig, _ int) []string { 11 | return getSubmoduleDisplayStrings(submodule) 12 | }) 13 | } 14 | 15 | func getSubmoduleDisplayStrings(s *models.SubmoduleConfig) []string { 16 | name := s.Name 17 | if s.ParentModule != nil { 18 | indentation := "" 19 | for p := s.ParentModule; p != nil; p = p.ParentModule { 20 | indentation += " " 21 | } 22 | 23 | name = indentation + "- " + s.Name 24 | } 25 | 26 | return []string{theme.DefaultTextColor.Sprint(name)} 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/plumbing/format/packfile/error.go: -------------------------------------------------------------------------------- 1 | package packfile 2 | 3 | import "fmt" 4 | 5 | // Error specifies errors returned during packfile parsing. 6 | type Error struct { 7 | reason, details string 8 | } 9 | 10 | // NewError returns a new error. 11 | func NewError(reason string) *Error { 12 | return &Error{reason: reason} 13 | } 14 | 15 | // Error returns a text representation of the error. 16 | func (e *Error) Error() string { 17 | if e.details == "" { 18 | return e.reason 19 | } 20 | 21 | return fmt.Sprintf("%s: %s", e.reason, e.details) 22 | } 23 | 24 | // AddDetails adds details to an error, with additional text. 25 | func (e *Error) AddDetails(format string, args ...interface{}) *Error { 26 | return &Error{ 27 | reason: e.reason, 28 | details: fmt.Sprintf(format, args...), 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/wk8/go-ordered-map/v2/Makefile: -------------------------------------------------------------------------------- 1 | .DEFAULT_GOAL := all 2 | 3 | .PHONY: all 4 | all: test_with_fuzz lint 5 | 6 | # the TEST_FLAGS env var can be set to eg run only specific tests 7 | TEST_COMMAND = go test -v -count=1 -race -cover $(TEST_FLAGS) 8 | 9 | .PHONY: test 10 | test: 11 | $(TEST_COMMAND) 12 | 13 | .PHONY: bench 14 | bench: 15 | go test -bench=. 16 | 17 | FUZZ_TIME ?= 10s 18 | 19 | # see https://github.com/golang/go/issues/46312 20 | # and https://stackoverflow.com/a/72673487/4867444 21 | # if we end up having more fuzz tests 22 | .PHONY: test_with_fuzz 23 | test_with_fuzz: 24 | $(TEST_COMMAND) -fuzz=FuzzRoundTripJSON -fuzztime=$(FUZZ_TIME) 25 | $(TEST_COMMAND) -fuzz=FuzzRoundTripYAML -fuzztime=$(FUZZ_TIME) 26 | 27 | .PHONY: fuzz 28 | fuzz: test_with_fuzz 29 | 30 | .PHONY: lint 31 | lint: 32 | golangci-lint run 33 | -------------------------------------------------------------------------------- /pkg/gui/types/search_state.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type SearchType int 4 | 5 | const ( 6 | SearchTypeNone SearchType = iota 7 | // searching is where matches are highlighted but the content is not filtered down 8 | SearchTypeSearch 9 | // filter is where the list is filtered down to only matches 10 | SearchTypeFilter 11 | ) 12 | 13 | // TODO: could we remove this entirely? 14 | type SearchState struct { 15 | Context Context 16 | PrevSearchIndex int 17 | } 18 | 19 | func NewSearchState() *SearchState { 20 | return &SearchState{PrevSearchIndex: -1} 21 | } 22 | 23 | func (self *SearchState) SearchType() SearchType { 24 | switch self.Context.(type) { 25 | case IFilterableContext: 26 | return SearchTypeFilter 27 | case ISearchableContext: 28 | return SearchTypeSearch 29 | default: 30 | return SearchTypeNone 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/kardianos/osext/README.md: -------------------------------------------------------------------------------- 1 | ### Extensions to the "os" package. 2 | 3 | [![GoDoc](https://godoc.org/github.com/kardianos/osext?status.svg)](https://godoc.org/github.com/kardianos/osext) 4 | 5 | ## Find the current Executable and ExecutableFolder. 6 | 7 | As of go1.8 the Executable function may be found in `os`. The Executable function 8 | in the std lib `os` package is used if available. 9 | 10 | There is sometimes utility in finding the current executable file 11 | that is running. This can be used for upgrading the current executable 12 | or finding resources located relative to the executable file. Both 13 | working directory and the os.Args[0] value are arbitrary and cannot 14 | be relied on; os.Args[0] can be "faked". 15 | 16 | Multi-platform and supports: 17 | * Linux 18 | * OS X 19 | * Windows 20 | * Plan 9 21 | * BSDs. 22 | -------------------------------------------------------------------------------- /vendor/github.com/petermattis/goid/goid_go1.5_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Peter Mattis. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | // implied. See the License for the specific language governing 13 | // permissions and limitations under the License. See the AUTHORS file 14 | // for names of contributors. 15 | 16 | // +build amd64 amd64p32 17 | // +build gc,go1.5 18 | 19 | package goid 20 | 21 | func Get() int64 22 | -------------------------------------------------------------------------------- /pkg/integration/tests/ui/open_link_failure.go: -------------------------------------------------------------------------------- 1 | package ui 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/config" 5 | . "github.com/jesseduffield/lazygit/pkg/integration/components" 6 | ) 7 | 8 | var OpenLinkFailure = NewIntegrationTest(NewIntegrationTestArgs{ 9 | Description: "When opening links via the OS fails, show a dialog instead.", 10 | ExtraCmdArgs: []string{}, 11 | Skip: false, 12 | SetupConfig: func(config *config.AppConfig) { 13 | config.UserConfig.OS.OpenLink = "exit 42" 14 | }, 15 | SetupRepo: func(shell *Shell) {}, 16 | Run: func(t *TestDriver, keys config.KeybindingConfig) { 17 | t.Views().Information().Click(0, 0) 18 | 19 | t.ExpectPopup().Confirmation(). 20 | Title(Equals("Donate")). 21 | Content(Equals("Please go to https://github.com/sponsors/jesseduffield")). 22 | Confirm() 23 | }, 24 | }) 25 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for RISCV64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/github.com/jesseduffield/go-git/v5/storage/filesystem/deltaobject.go: -------------------------------------------------------------------------------- 1 | package filesystem 2 | 3 | import ( 4 | "github.com/jesseduffield/go-git/v5/plumbing" 5 | ) 6 | 7 | type deltaObject struct { 8 | plumbing.EncodedObject 9 | base plumbing.Hash 10 | hash plumbing.Hash 11 | size int64 12 | } 13 | 14 | func newDeltaObject( 15 | obj plumbing.EncodedObject, 16 | hash plumbing.Hash, 17 | base plumbing.Hash, 18 | size int64) plumbing.DeltaObject { 19 | return &deltaObject{ 20 | EncodedObject: obj, 21 | hash: hash, 22 | base: base, 23 | size: size, 24 | } 25 | } 26 | 27 | func (o *deltaObject) BaseHash() plumbing.Hash { 28 | return o.base 29 | } 30 | 31 | func (o *deltaObject) ActualSize() int64 { 32 | return o.size 33 | } 34 | 35 | func (o *deltaObject) ActualHash() plumbing.Hash { 36 | return o.hash 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/position.go: -------------------------------------------------------------------------------- 1 | package ssh_config 2 | 3 | import "fmt" 4 | 5 | // Position of a document element within a SSH document. 6 | // 7 | // Line and Col are both 1-indexed positions for the element's line number and 8 | // column number, respectively. Values of zero or less will cause Invalid(), 9 | // to return true. 10 | type Position struct { 11 | Line int // line within the document 12 | Col int // column within the line 13 | } 14 | 15 | // String representation of the position. 16 | // Displays 1-indexed line and column numbers. 17 | func (p Position) String() string { 18 | return fmt.Sprintf("(%d, %d)", p.Line, p.Col) 19 | } 20 | 21 | // Invalid returns whether or not the position is valid (i.e. with negative or 22 | // null values) 23 | func (p Position) Invalid() bool { 24 | return p.Line <= 0 || p.Col <= 0 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // 8 | // System call support for 386, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-32 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-36 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$4-4 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/github.com/petermattis/goid/goid_go1.3.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Peter Mattis. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | // implied. See the License for the specific language governing 13 | // permissions and limitations under the License. See the AUTHORS file 14 | // for names of contributors. 15 | 16 | // +build !go1.4 17 | 18 | package goid 19 | 20 | // Get returns the id of the current goroutine. 21 | func Get() int64 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // 8 | // System call support for amd64, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-64 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-56 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$8-8 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for AMD64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ppc64, BSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /pkg/gui/controllers/base_controller.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "github.com/jesseduffield/gocui" 5 | "github.com/jesseduffield/lazygit/pkg/gui/types" 6 | ) 7 | 8 | type baseController struct{} 9 | 10 | func (self *baseController) GetKeybindings(opts types.KeybindingsOpts) []*types.Binding { 11 | return nil 12 | } 13 | 14 | func (self *baseController) GetMouseKeybindings(opts types.KeybindingsOpts) []*gocui.ViewMouseBinding { 15 | return nil 16 | } 17 | 18 | func (self *baseController) GetOnClick() func() error { 19 | return nil 20 | } 21 | 22 | func (self *baseController) GetOnRenderToMain() func() error { 23 | return nil 24 | } 25 | 26 | func (self *baseController) GetOnFocus() func(types.OnFocusOpts) error { 27 | return nil 28 | } 29 | 30 | func (self *baseController) GetOnFocusLost() func(types.OnFocusLostOpts) error { 31 | return nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/petermattis/goid/goid_go1.3.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Peter Mattis. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | // implied. See the License for the specific language governing 13 | // permissions and limitations under the License. See the AUTHORS file 14 | // for names of contributors. 15 | 16 | // +build !go1.4 17 | 18 | #include 19 | 20 | void ·Get(int64 ret) { 21 | ret = g->goid; 22 | USED(&ret); 23 | } 24 | -------------------------------------------------------------------------------- /pkg/gui/controllers/helpers/upstream_helper_test.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/jesseduffield/lazygit/pkg/commands/models" 7 | "github.com/samber/lo" 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestGetSuggestedRemote(t *testing.T) { 12 | cases := []struct { 13 | remotes []*models.Remote 14 | expected string 15 | }{ 16 | {mkRemoteList(), "origin"}, 17 | {mkRemoteList("upstream", "origin", "foo"), "origin"}, 18 | {mkRemoteList("upstream", "foo", "bar"), "upstream"}, 19 | } 20 | 21 | for _, c := range cases { 22 | result := getSuggestedRemote(c.remotes) 23 | assert.EqualValues(t, c.expected, result) 24 | } 25 | } 26 | 27 | func mkRemoteList(names ...string) []*models.Remote { 28 | return lo.Map(names, func(name string, _ int) *models.Remote { 29 | return &models.Remote{Name: name} 30 | }) 31 | } 32 | -------------------------------------------------------------------------------- /pkg/integration/tests/branch/open_pull_request_no_upstream.go: -------------------------------------------------------------------------------- 1 | package branch 2 | 3 | import ( 4 | "github.com/jesseduffield/lazygit/pkg/config" 5 | . "github.com/jesseduffield/lazygit/pkg/integration/components" 6 | ) 7 | 8 | var OpenPullRequestNoUpstream = NewIntegrationTest(NewIntegrationTestArgs{ 9 | Description: "Open up a pull request with a missing upstream branch", 10 | ExtraCmdArgs: []string{}, 11 | Skip: false, 12 | SetupConfig: func(config *config.AppConfig) {}, 13 | SetupRepo: func(shell *Shell) {}, 14 | Run: func(t *TestDriver, keys config.KeybindingConfig) { 15 | t.Views(). 16 | Branches(). 17 | Focus(). 18 | Press(keys.Branches.CreatePullRequest) 19 | 20 | t.ExpectPopup().Alert(). 21 | Title(Equals("Error")). 22 | Content(Contains("Cannot open a pull request for a branch with no upstream")). 23 | Confirm() 24 | }, 25 | }) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Recreate a getsystemcfg syscall handler instead of 6 | // using the one provided by x/sys/unix to avoid having 7 | // the dependency between them. (See golang.org/issue/32102) 8 | // Moreover, this file will be used during the building of 9 | // gccgo's libgo and thus must not used a CGo method. 10 | 11 | //go:build aix && gccgo 12 | 13 | package cpu 14 | 15 | import ( 16 | "syscall" 17 | ) 18 | 19 | //extern getsystemcfg 20 | func gccgoGetsystemcfg(label uint32) (r uint64) 21 | 22 | func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) { 23 | r1 = uintptr(gccgoGetsystemcfg(uint32(label))) 24 | e1 = syscall.GetErrno() 25 | return 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev >> 16) & 0xffff) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32(dev & 0xffff) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | return uint64(((major) << 16) | (minor)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | --------------------------------------------------------------------------------