743 Commits
Author SHA1 Message Date
Jesse Duffield 2df78b257b don't pass single commands directly to RunCommand (or equivalent function)
when it contains percentages.

This is a really strange one. It's a linting warning in my editor
and it doesn't stop me from compiling, but it breaks `go test`.

A basic file to reproduce what I'm talking about:

package main

import "fmt"

func main() {
	notSprintf("test %s") // compiler complains here thinking %s needs a corresponding argument
}

func notSprintf(formatStr string, formatArgs ...interface{}) string {
	if formatArgs != nil {
		return formatStr
	}
	return fmt.Sprintf(formatStr, formatArgs...)
}
2019-11-21 21:59:25 +11:00
Jesse Duffield 85017d43a7 fix specs 2019-11-21 21:51:35 +11:00
Jesse Duffield 33fbe2d5c5 couple of things to clean up after rebasing onto master 2019-11-21 21:17:31 +11:00
Jesse Duffield 890fd2a511 give RunCommand the same input signature as fmt.Sprintf 2019-11-21 21:16:05 +11:00
Jesse Duffield 16a08da10d add tags panel 2019-11-21 21:16:05 +11:00
Jesse Duffield 0a04dacb06 allow editing remotes 2019-11-21 21:15:49 +11:00
Jesse Duffield 150aa76923 require double clicking menu items so you know what you're clicking 2019-11-21 21:15:49 +11:00
Jesse Duffield 03d838980a refactor confirmation prompt code 2019-11-21 21:15:49 +11:00
Jesse Duffield 05c179bfd1 better handling of click events in list views 2019-11-21 21:15:49 +11:00
Jesse Duffield b19866545e support setting upstream 2019-11-21 21:15:49 +11:00
Jesse Duffield a2077bec48 better fast forward 2019-11-21 21:15:49 +11:00
Jesse Duffield cb68452afd make upstream branch display more lenient on git errors 2019-11-21 21:15:49 +11:00
Jesse Duffield 57c0fc24de support rebasing onto remote branch 2019-11-21 21:15:49 +11:00
Jesse Duffield 2feb187a6c support deleting remote branches 2019-11-21 21:15:49 +11:00
Jesse Duffield cb9aa60830 ensure we switch tabs when switching context 2019-11-21 21:15:49 +11:00
Jesse Duffield 25177dfd2b support merging remote branches into checked out branch 2019-11-21 21:15:49 +11:00
Jesse Duffield f864eb1e65 support detached heads when showing the selected branch 2019-11-21 21:15:49 +11:00
Jesse Duffield 65f3073e7e support adding/removing remotes 2019-11-21 21:15:49 +11:00
Jesse Duffield ff75984796 split RemoteBranch out from Branch 2019-11-21 21:15:49 +11:00
Jesse Duffield 089c55a0b3 get branches with git for-each-ref 2019-11-21 21:15:27 +11:00
Jesse Duffield 620e49b8e3 only refresh branches panel on focus lost when in the local-branches context 2019-11-21 21:15:27 +11:00
Jesse Duffield 3b7e4cf2e6 support viewing a remote branch 2019-11-21 21:15:27 +11:00
Jesse Duffield 73ad5ec13c support navigating remotes view 2019-11-21 21:15:05 +11:00
Jesse Duffield 7296a6bff4 remove redundant logging 2019-11-21 21:15:05 +11:00
Jesse Duffield 5aed1c0499 allow changing tabs with [ and ] 2019-11-21 21:15:05 +11:00
Jesse Duffield 03ceb0b1ba get remote branches when getting remotes 2019-11-21 21:15:05 +11:00
Jesse Duffield 3ea79ef4e1 trying to use gogit with branches from remotes 2019-11-21 21:15:05 +11:00
Jesse Duffield fdb2880075 extract out some logic for list views 2019-11-21 21:15:05 +11:00
Jesse Duffield 404001be8a add contexts to views 2019-11-21 21:15:05 +11:00
Jesse Duffield 331616a5e8 add remotes context to branches view 2019-11-21 21:11:56 +11:00
Jesse Duffield 82b11bafef add remote model 2019-11-21 21:11:12 +11:00
Jesse Duffield f15e47bb67 add file watching for modified files
log createErrorPanel error

swallow error when adding file to watcher
2019-11-14 22:22:47 +11:00
Jesse Duffield 7995d56a85 allow editing or opening a file while resolving merge conflicts 2019-11-14 22:22:47 +11:00
Jesse Duffield 3b1d705473 show upstream branch for branch 2019-11-13 22:25:42 +11:00
Jesse Duffield f43ba728e3 prompt to set upstream when pulling on untracked branch
prompt to set upstream when pulling on untracked branch
2019-11-13 21:36:16 +11:00
Jesse Duffield b907c74386 remove go-getter 2019-11-12 22:58:01 +11:00
Jesse Duffield 12b84307ac specify upstream when pushing a branch for the first time 2019-11-11 23:30:30 +11:00
Jesse Duffield cbc82cd3c1 allow for changing the current directory on exit
For this to work you'll need to put this in your ~/.zshrc (or equivalent rc file):

lg()
{
    export LAZYGIT_NEW_DIR_FILE=/Users/jesseduffieldduffield/Library/Application\ Support/jesseduffield/lazygit/.lastd

    lazygit "$@"

    if [ -f $LAZYGIT_NEW_DIR_FILE ]; then
            cd "$(cat $LAZYGIT_NEW_DIR_FILE)"
            rm -f $LAZYGIT_NEW_DIR_FILE > /dev/null
    fi
}
2019-11-11 21:45:31 +11:00
Jesse Duffield e174e5254d support clicking through to commit files panel 2019-11-10 22:32:13 +11:00
Jesse Duffield de5bcb8b9c add some shameless self promotion 2019-11-10 22:32:13 +11:00
Jesse Duffield 98666186ee add '?' keybinding for opening options menu 2019-11-10 22:32:13 +11:00
Jesse Duffield 941d3c6648 allow secondary view to be scrolled 2019-11-10 22:32:13 +11:00
Jesse Duffield df72eee201 don't try to give a logrus entry object to gocui 2019-11-10 22:32:13 +11:00
Jesse Duffield 131113b065 simplify how the context system works 2019-11-10 22:32:13 +11:00
Jesse Duffield e85310c0a9 add mouse support 2019-11-10 22:32:13 +11:00
Jesse Duffield cd17b46b55 reset patch builder when we've escaped from the building phase and nothing has been added 2019-11-10 16:18:25 +11:00
Jesse Duffield d0d92c7697 remove old add patch keybinding 2019-11-10 15:01:40 +11:00
Jesse Duffield 194c554357 support ours/theirs merge conflict headers 2019-11-08 09:31:27 +11:00
Jesse Duffield 2f37c0caaf fix tests 2019-11-05 19:22:01 +11:00
Jesse Duffield 86a39e3aea only test with non-original header 2019-11-05 19:22:01 +11:00