summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-08-25 11:02:46 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-08-25 11:02:46 +1000
commitf24c95aedec785985dfcd98ff3997152c193bd3e (patch)
tree9f8ac1a61cf686052f623b767e13d6d1a14e3683
parent5628eae502ee3b4d3d72a8e4045713b637f7a764 (diff)
parent93ab892bdd1226f9a519a938c8b28590e71e54f3 (diff)
Merge branch 'master' into feature/auto-updates
-rw-r--r--.circleci/config.yml48
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md1
-rw-r--r--.gitignore3
-rw-r--r--Gopkg.lock32
-rw-r--r--Gopkg.toml4
-rw-r--r--README.md2
-rw-r--r--docs/Config.md4
-rw-r--r--docs/Keybindings.md1
-rw-r--r--docs/resources/colored-border-example.pngbin0 -> 90126 bytes
-rw-r--r--pkg/app/app.go7
-rw-r--r--pkg/commands/git.go12
-rw-r--r--pkg/commands/git_test.go2
-rw-r--r--pkg/commands/os.go5
-rw-r--r--pkg/config/app_config.go10
-rw-r--r--pkg/git/branch_list_builder.go2
-rw-r--r--pkg/gui/branches_panel.go21
-rw-r--r--pkg/gui/files_panel.go8
-rw-r--r--pkg/gui/gui.go9
-rw-r--r--pkg/gui/keybindings.go2
-rw-r--r--pkg/gui/view_helpers.go6
-rw-r--r--pkg/i18n/dutch.go8
-rw-r--r--pkg/i18n/english.go8
-rw-r--r--pkg/i18n/i18n.go72
-rw-r--r--pkg/i18n/i18n_test.go81
-rw-r--r--pkg/test/test.go16
-rw-r--r--pkg/updates/updates.go2
-rw-r--r--pkg/utils/utils.go7
-rw-r--r--pkg/utils/utils_test.go33
-rwxr-xr-xtest.sh14
-rwxr-xr-xtest/repos/bom.sh23
-rw-r--r--vendor/github.com/jesseduffield/gocui/gui.go28
-rw-r--r--vendor/github.com/jesseduffield/gocui/keybinding.go3
-rw-r--r--vendor/github.com/sirupsen/logrus/LICENSE (renamed from vendor/github.com/Sirupsen/logrus/LICENSE)0
-rw-r--r--vendor/github.com/sirupsen/logrus/alt_exit.go (renamed from vendor/github.com/Sirupsen/logrus/alt_exit.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/doc.go (renamed from vendor/github.com/Sirupsen/logrus/doc.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/entry.go (renamed from vendor/github.com/Sirupsen/logrus/entry.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/exported.go (renamed from vendor/github.com/Sirupsen/logrus/exported.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/formatter.go (renamed from vendor/github.com/Sirupsen/logrus/formatter.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/hooks.go (renamed from vendor/github.com/Sirupsen/logrus/hooks.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/json_formatter.go (renamed from vendor/github.com/Sirupsen/logrus/json_formatter.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/logger.go (renamed from vendor/github.com/Sirupsen/logrus/logger.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/logrus.go (renamed from vendor/github.com/Sirupsen/logrus/logrus.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_bsd.go (renamed from vendor/github.com/Sirupsen/logrus/terminal_bsd.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_check_appengine.go (renamed from vendor/github.com/Sirupsen/logrus/terminal_check_appengine.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go (renamed from vendor/github.com/Sirupsen/logrus/terminal_check_notappengine.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_linux.go (renamed from vendor/github.com/Sirupsen/logrus/terminal_linux.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/text_formatter.go (renamed from vendor/github.com/Sirupsen/logrus/text_formatter.go)0
-rw-r--r--vendor/github.com/sirupsen/logrus/writer.go (renamed from vendor/github.com/Sirupsen/logrus/writer.go)0
-rw-r--r--vendor/github.com/spkg/bom/LICENSE.md21
-rw-r--r--vendor/github.com/spkg/bom/bom.go39
-rw-r--r--vendor/github.com/spkg/bom/discard_go14.go12
-rw-r--r--vendor/github.com/spkg/bom/discard_go15.go10
52 files changed, 438 insertions, 118 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index c5f520b70..0eef1a409 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,26 +1,42 @@
-# Golang CircleCI 2.0 configuration file
-#
-# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
build:
docker:
- # specify the version
- - image: circleci/golang:1.9
+ - image: circleci/golang:1.10
- # Specify service dependencies here if necessary
- # CircleCI maintains a library of pre-built images
- # documented at https://circleci.com/docs/2.0/circleci-images/
- # - image: circleci/postgres:9.4
+ working_directory: /go/src/github.com/jesseduffield/lazygit
+ steps:
+ - checkout
+ - run:
+ name: Run tests
+ command: |
+ ./test.sh
+ - run:
+ name: Push on codecov result
+ command: |
+ bash <(curl -s https://codecov.io/bash)
- #### TEMPLATE_NOTE: go expects specific checkout path representing url
- #### expecting it in the form of
- #### /go/src/github.com/circleci/go-tool
- #### /go/src/bitbucket.org/circleci/go-tool
+ release:
+ docker:
+ - image: circleci/golang:1.10
working_directory: /go/src/github.com/jesseduffield/lazygit
steps:
- checkout
+ - run:
+ name: Run gorelease
+ command: |
+ curl -sL https://git.io/goreleaser | bash
- # specify any bash command here prefixed with `run: `
- - run: go test -v ./...
- - run: bash <(curl -s https://codecov.io/bash)
+workflows:
+ version: 2
+ build:
+ jobs:
+ - build
+ release:
+ jobs:
+ - release:
+ filters:
+ tags:
+ only: /v[0-9]+(\.[0-9]+)*/
+ branches:
+ ignore: /.*/
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 1a96635a3..b10cb5f37 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -23,6 +23,7 @@ If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. Windows]
- Lazygit Version [e.g. v0.1.45]
+ - The last commit id if you built project from sources (run : ```git-rev parse HEAD```)
**Additional context**
Add any other context about the problem here.
diff --git a/.gitignore b/.gitignore
index 304a2356f..f759e8a06 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@ TODO.md
# Tests
test/repos/repo
+coverage.txt
# Binaries
-lazygit \ No newline at end of file
+lazygit
diff --git a/Gopkg.lock b/Gopkg.lock
index dc92d8e90..bf05a0041 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -2,14 +2,6 @@
[[projects]]
- digest = "1:b2339e83ce9b5c4f79405f949429a7f68a9a904fed903c672aac1e7ceb7f5f02"
- name = "github.com/Sirupsen/logrus"
- packages = ["."]
- pruneopts = "NUT"
- revision = "3e01752db0189b9157070a0e1668a620f9a85da2"
- version = "v1.0.6"
-
-[[projects]]
branch = "master"
digest = "1:cd7ba2b29e93e2a8384e813dfc80ebb0f85d9214762e6ca89bb55a58092eab87"
name = "github.com/cloudfoundry/jibber_jabber"
@@ -93,11 +85,11 @@
[[projects]]
branch = "master"
- digest = "1:c9a848b0484a72da2dae28957b4f67501fe27fa38bc73f4713e454353c0a4a60"
+ digest = "1:f774b11ae458cae2d10b94ef66ef00ba1c57f1971dd0e5534ac743cbe574f6d4"
name = "github.com/jesseduffield/gocui"
packages = ["."]
pruneopts = "NUT"
- revision = "432b7f6215f81ef1aaa1b2d9b69887822923cf79"
+ revision = "7818a0f93387d1037cbd06f69323d9f8d068af7c"
[[projects]]
digest = "1:8021af4dcbd531ae89433c8c3a6520e51064114aaf8eb1724c3cf911c497c9ba"
@@ -216,7 +208,6 @@
version = "v1.0.0"
[[projects]]
- branch = "master"
digest = "1:41618aee8828e62dfe62d44f579c06892d0e98907d1c6d5bcd83bfe8536ec5a3"
name = "github.com/shibukawa/configdir"
packages = ["."]
@@ -224,6 +215,14 @@
revision = "e180dbdc8da04c4fa04272e875ce64949f38bd3e"
[[projects]]
+ digest = "1:b2339e83ce9b5c4f79405f949429a7f68a9a904fed903c672aac1e7ceb7f5f02"
+ name = "github.com/sirupsen/logrus"
+ packages = ["."]
+ pruneopts = "NUT"
+ revision = "3e01752db0189b9157070a0e1668a620f9a85da2"
+ version = "v1.0.6"
+
+[[projects]]
digest = "1:330e9062b308ac597e28485699c02223bd052437a6eed32a173c9227dcb9d95a"
name = "github.com/spf13/afero"
packages = [
@@ -267,6 +266,14 @@
version = "v1.1.0"
[[projects]]
+ branch = "master"
+ digest = "1:0e9a5ac14bcc11f205031a671b28c7e05cb88b2ebbe06f383c1ab0b2c12c7cb5"
+ name = "github.com/spkg/bom"
+ packages = ["."]
+ pruneopts = "NUT"
+ revision = "59b7046e48ad6bac800c5e1dd5142282cbfcf154"
+
+[[projects]]
digest = "1:ccca1dcd18bc54e23b517a3c5babeff2e3924a7d8fc1932162225876cfe4bfb0"
name = "github.com/src-d/gcfg"
packages = [
@@ -447,7 +454,6 @@
analyzer-name = "dep"
analyzer-version = 1
input-imports = [
- "github.com/Sirupsen/logrus",
"github.com/cloudfoundry/jibber_jabber",
"github.com/davecgh/go-spew/spew",
"github.com/fatih/color",
@@ -456,7 +462,9 @@
"github.com/mgutz/str",
"github.com/nicksnyder/go-i18n/v2/i18n",
"github.com/shibukawa/configdir",
+ "github.com/sirupsen/logrus",
"github.com/spf13/viper",
+ "github.com/spkg/bom",
"github.com/stretchr/testify/assert",
"github.com/tcnksm/go-gitconfig",
"golang.org/x/text/language",
diff --git a/Gopkg.toml b/Gopkg.toml
index a47fe5e93..1f0b03cee 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -40,3 +40,7 @@
[[constraint]]
name = "gopkg.in/src-d/go-git.v4"
revision = "43d17e14b714665ab5bc2ecc220b6740779d733f"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/spkg/bom"
diff --git a/README.md b/README.md
index 6b85ffbe1..28fe9c399 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# lazygit [![Go Report Card](https://goreportcard.com/badge/github.com/jesseduffield/lazygit)](https://goreportcard.com/report/github.com/jesseduffield/lazygit)
+# lazygit [![CircleCI](https://circleci.com/gh/jesseduffield/lazygit.svg?style=svg)](https://circleci.com/gh/jesseduffield/lazygit) [![codecov](https://codecov.io/gh/jesseduffield/lazygit/branch/master/graph/badge.svg)](https://codecov.io/gh/jesseduffield/lazygit) [![Go Report Card](https://goreportcard.com/badge/github.com/jesseduffield/lazygit)](https://goreportcard.com/report/github.com/jesseduffield/lazygit) [![GolangCI](https://golangci.com/badges/github.com/jesseduffield/lazygit.svg)](https://golangci.com) [![GoDoc](https://godoc.org/github.com/jesseduffield/lazygit?status.svg)](http://godoc.org/github.com/jesseduffield/lazygit) [![GitHub tag](https://img.shields.io/github/tag/jesseduffield/lazygit.svg)]()
A simple terminal UI for git commands, written in Go with the [gocui](https://github.com/jroimartin/gocui "gocui") library.
diff --git a/docs/Config.md b/docs/Config.md
index e6e2c3974..7e657adc4 100644
--- a/docs/Config.md
+++ b/docs/Config.md
@@ -37,3 +37,7 @@ The available attributes are:
- bold
- reverse # useful for high-contrast
- underline
+
+## Example Coloring:
+
+![border example](/docs/resources/colored-border-example.png)
diff --git a/docs/Keybindings.md b/docs/Keybindings.md
index 2a1b1817f..37fb523a2 100644
--- a/docs/Keybindings.md
+++ b/docs/Keybindings.md
@@ -44,6 +44,7 @@
<kbd>c</kbd>: checkout by name
<kbd>n</kbd>: new branch
<kbd>d</kbd>: delete branch
+ <kbd>D</kbd>: force delete branch
</pre>
## Commits Panel:
diff --git a/docs/resources/colored-border-example.png b/docs/resources/colored-border-example.png
new file mode 100644
index 000000000..06bb7bf8b
--- /dev/null
+++ b/docs/resources/colored-border-example.png
Binary files differ
diff --git a/pkg/app/app.go b/pkg/app/app.go
index e1a26e13d..d4219289e 100644
--- a/pkg/app/app.go
+++ b/pkg/app/app.go
@@ -5,7 +5,7 @@ import (
"io/ioutil"
"os"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/gui"
@@ -53,10 +53,7 @@ func NewApp(config config.AppConfigurer) (*App, error) {
return app, err
}
- app.Tr, err = i18n.NewLocalizer(app.Log)
- if err != nil {
- return app, err
- }
+ app.Tr = i18n.NewLocalizer(app.Log)
app.GitCommand, err = commands.NewGitCommand(app.Log, app.OSCommand)
if err != nil {
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index bf9aa6646..14f3a433a 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -7,7 +7,7 @@ import (
"os/exec"
"strings"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/utils"
gitconfig "github.com/tcnksm/go-gitconfig"
@@ -223,8 +223,14 @@ func (c *GitCommand) NewBranch(name string) error {
}
// DeleteBranch delete branch
-func (c *GitCommand) DeleteBranch(branch string) error {
- return c.OSCommand.RunCommand("git branch -d " + branch)
+func (c *GitCommand) DeleteBranch(branch string, force bool) error {
+ var command string
+ if force {
+ command = "git branch -D "
+ } else {
+ command = "git branch -d "
+ }
+ return c.OSCommand.RunCommand(command + branch)
}
// ListStash list stash
diff --git a/pkg/commands/git_test.go b/pkg/commands/git_test.go
index 9c2a64330..c930f76eb 100644
--- a/pkg/commands/git_test.go
+++ b/pkg/commands/git_test.go
@@ -5,7 +5,7 @@ import (
"strings"
"testing"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
"github.com/jesseduffield/lazygit/pkg/test"
)
diff --git a/pkg/commands/os.go b/pkg/commands/os.go
index 9756d619d..1eef36151 100644
--- a/pkg/commands/os.go
+++ b/pkg/commands/os.go
@@ -11,7 +11,7 @@ import (
"github.com/mgutz/str"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
gitconfig "github.com/tcnksm/go-gitconfig"
)
@@ -175,7 +175,8 @@ func (c *OSCommand) Unquote(message string) string {
return message
}
-func (C *OSCommand) AppendLineToFile(filename, line string) error {
+// AppendLineToFile adds a new line in file
+func (c *OSCommand) AppendLineToFile(filename, line string) error {
f, err := os.OpenFile(filename, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)
if err != nil {
return err
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go
index 9f258d4a6..aa56365e3 100644
--- a/pkg/config/app_config.go
+++ b/pkg/config/app_config.go
@@ -121,10 +121,7 @@ func LoadUserConfigFromFile(v *viper.Viper) error {
folder = configDirs.QueryFolderContainsFile("config.yml")
}
v.AddConfigPath(folder.Path)
- if err := v.MergeInConfig(); err != nil {
- return err
- }
- return nil
+ return v.MergeInConfig()
}
// InsertToUserConfig adds a key/value pair to the user's config and saves it
@@ -139,10 +136,7 @@ func (c *AppConfig) InsertToUserConfig(key, value string) error {
return err
}
v.Set(key, value)
- if err := v.WriteConfig(); err != nil {
- return err
- }
- return nil
+ return v.WriteConfig()
}
func getDefaultConfig() []byte {
diff --git a/pkg/git/branch_list_builder.go b/pkg/git/branch_list_builder.go
index 869e05c98..37421d5b6 100644
--- a/pkg/git/branch_list_builder.go
+++ b/pkg/git/branch_list_builder.go
@@ -7,7 +7,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/utils"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
"gopkg.in/src-d/go-git.v4/plumbing"
)
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go
index 67e0ceb07..df4dcff78 100644
--- a/pkg/gui/branches_panel.go
+++ b/pkg/gui/branches_panel.go
@@ -62,20 +62,34 @@ func (gui *Gui) handleNewBranch(g *gocui.Gui, v *gocui.View) error {
}
func (gui *Gui) handleDeleteBranch(g *gocui.Gui, v *gocui.View) error {
+ return gui.deleteBranch(g, v, false)
+}
+
+func (gui *Gui) handleForceDeleteBranch(g *gocui.Gui, v *gocui.View) error {
+ return gui.deleteBranch(g, v, true)
+}
+
+func (gui *Gui) deleteBranch(g *gocui.Gui, v *gocui.View, force bool) error {
checkedOutBranch := gui.State.Branches[0]
selectedBranch := gui.getSelectedBranch(v)
if checkedOutBranch.Name == selectedBranch.Name {
return gui.createErrorPanel(g, gui.Tr.SLocalize("CantDeleteCheckOutBranch"))
}
+ title := gui.Tr.SLocalize("DeleteBranch")
+ var messageId string
+ if force {
+ messageId = "ForceDeleteBranchMessage"
+ } else {
+ messageId = "DeleteBranchMessage"
+ }
message := gui.Tr.TemplateLocalize(
- "DeleteBranchMessage",
+ messageId,
Teml{
"selectedBranchName": selectedBranch.Name,
},
)
- title := gui.Tr.SLocalize("DeleteBranch")
return gui.createConfirmationPanel(g, v, title, message, func(g *gocui.Gui, v *gocui.View) error {
- if err := gui.GitCommand.DeleteBranch(selectedBranch.Name); err != nil {
+ if err := gui.GitCommand.DeleteBranch(selectedBranch.Name, force); err != nil {
return gui.createErrorPanel(g, err.Error())
}
return gui.refreshSidePanels(g)
@@ -108,6 +122,7 @@ func (gui *Gui) renderBranchesOptions(g *gocui.Gui) error {
"c": gui.Tr.SLocalize("checkoutByName"),
"n": gui.Tr.SLocalize("newBranch"),
"d": gui.Tr.SLocalize("deleteBranch"),
+ "D": gui.Tr.SLocalize("forceDeleteBranch"),
"← → ↑ ↓": gui.Tr.SLocalize("navigate"),
})
}
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go
index 7ddb50811..5791a9d15 100644
--- a/pkg/gui/files_panel.go
+++ b/pkg/gui/files_panel.go
@@ -251,14 +251,6 @@ func (gui *Gui) handleFileEdit(g *gocui.Gui, v *gocui.View) error {
return gui.genericFileOpen(g, v, file.Name, gui.OSCommand.EditFile)
}
-func (gui *Gui) openFile(filename string) error {
- err := gui.OSCommand.OpenFile(filename)
- if err != nil {
- return gui.createErrorPanel(gui.g, err.Error())
- }
- return nil
-}
-
func (gui *Gui) handleFileOpen(g *gocui.Gui, v *gocui.View) error {
file, err := gui.getSelectedFile(g)
if err != nil {
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index baed39056..c00b26b78 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -15,13 +15,13 @@ import (
// "strings"
- "github.com/Sirupsen/logrus"
"github.com/golang-collections/collections/stack"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/i18n"
"github.com/jesseduffield/lazygit/pkg/updates"
+ "github.com/sirupsen/logrus"
)
// OverlappingEdges determines if panel edges overlap
@@ -152,14 +152,15 @@ func (gui *Gui) setAppStatus(status string) error {
func (gui *Gui) layout(g *gocui.Gui) error {
g.Highlight = true
width, height := g.Size()
+ version := gui.Config.GetVersion()
leftSideWidth := width / 3
statusFilesBoundary := 2
filesBranchesBoundary := 2 * height / 5 // height - 20
commitsBranchesBoundary := 3 * height / 5 // height - 10
commitsStashBoundary := height - 5 // height - 5
+ optionsVersionBoundary := width - max(len(version), 1)
minimumHeight := 16
minimumWidth := 10
- version := gui.Config.GetVersion()
appStatusView, _ := g.View("appStatus")
appStatusOptionsBoundary := -2
@@ -244,7 +245,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
v.FgColor = gocui.ColorWhite
}
- if v, err := g.SetView("options", appStatusOptionsBoundary-1, optionsTop, width-len(version)-2, optionsTop+2, 0); err != nil {
+ if v, err := g.SetView("options", appStatusOptionsBoundary-1, optionsTop, optionsVersionBoundary-1, optionsTop+2, 0); err != nil {
if err != gocui.ErrUnknownView {
return err
}
@@ -281,7 +282,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
v.Frame = false
}
- if v, err := g.SetView("version", width-len(version)-1, optionsTop, width, optionsTop+2, 0); err != nil {
+ if v, err := g.SetView("version", optionsVersionBoundary-1, optionsTop, width, optionsTop+2, 0); err != nil {
if err != gocui.ErrUnknownView {
return err
}
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index 68cccda6b..8041d14ff 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -16,6 +16,7 @@ func (gui *Gui) keybindings(g *gocui.Gui) error {
bindings := []Binding{
{ViewName: "", Key: 'q', Modifier: gocui.ModNone, Handler: gui.quit},
{ViewName: "", Key: gocui.KeyCtrlC, Modifier: gocui.ModNone, Handler: gui.quit},
+ {ViewName: "", Key: gocui.KeyEsc, Modifier: gocui.ModNone, Handler: gui.quit},
{ViewName: "", Key: gocui.KeyPgup, Modifier: gocui.ModNone, Handler: gui.scrollUpMain},
{ViewName: "", Key: gocui.KeyPgdn, Modifier: gocui.ModNone, Handler: gui.scrollDownMain},
{ViewName: "", Key: gocui.KeyCtrlU, Modifier: gocui.ModNone, Handler: gui.scrollUpMain},
@@ -57,6 +58,7 @@ func (gui *Gui) keybindings(g *gocui.Gui) error {
{ViewName: "branches", Key: 'F', Modifier: gocui.ModNone, Handler: gui.handleForceCheckout},
{ViewName: "branches", Key: 'n', Modifier: gocui.ModNone, Handler: gui.handleNewBranch},
{ViewName: "branches", Key: 'd', Modifier: gocui.ModNone, Handler: gui.handleDeleteBranch},
+ {ViewName: "branches", Key: 'D', Modifier: gocui.ModNone, Handler: gui.handleForceDeleteBranch},
{ViewName: "branches", Key: 'm', Modifier: gocui.ModNone, Handler: gui.handleMerge},
{ViewName: "commits", Key: 's', Modifier: gocui.ModNone, Handler: gui.handleCommitSquashDown},
{ViewName: "commits", Key: 'r', Modifier: gocui.ModNone, Handler: gui.handleRenameCommit},
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go
index cfe985867..91d81b55e 100644
--- a/