324 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 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 2feb187a6c support deleting remote branches 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 7296a6bff4 remove redundant logging 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 82b11bafef add remote model 2019-11-21 21:11:12 +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 12b84307ac specify upstream when pushing a branch for the first time 2019-11-11 23:30:30 +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 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
Jesse Duffield 72fe770974 better interface for ApplyPatch function 2019-11-05 19:22:01 +11:00
Jesse Duffield db8c398fa3 strip whitespace when there is nothing else 2019-11-05 19:22:01 +11:00
Jesse Duffield 861bcc38be fix ambiguous condition 2019-11-05 19:22:01 +11:00
Jesse Duffield cd3874ffb7 don't let patch manager ever be nil 2019-11-05 19:22:01 +11:00
Jesse Duffield 48347d4d86 use fallback approach for applying patch 2019-11-05 19:22:01 +11:00
Jesse Duffield 0046e9c469 create backups of patch files in case something goes wrong 2019-11-05 19:22:01 +11:00
Jesse Duffield 733145d132 clear patch after successful patch operation 2019-11-05 19:22:01 +11:00
Jesse Duffield f285d80d0e move PatchManager to GitCommand 2019-11-05 19:22:01 +11:00
Jesse Duffield 1fc120de2d better rebase args 2019-11-05 19:22:01 +11:00
Jesse Duffield d5e443e8e3 Support building and moving patches
WIP
2019-11-05 19:22:01 +11:00
Jesse Duffield 820f3d5cbb support split view in staging panel and staging ranges 2019-11-05 19:22:01 +11:00
mjarkkandJesse Duffield 02fef3136f Added light theme option to the settings 2019-10-20 12:32:57 +11:00
Giorgio PreviteraandJesse Duffield 827837b0b9 477 Remove unnecessary variable check
hasInlineMergeConflicts is always true with hasMergeConflicts is true
2019-07-27 11:05:23 +10:00
Giorgio PreviteraandJesse Duffield e83ef9858b #477 Remove NeedMerge boolean
Instead of storing the status in a new variable, derive it from
the existing three fields
2019-07-27 11:05:23 +10:00
Giorgio PreviteraandJesse Duffield 504d506575 477 Add new NeedReset property to File and update tests
Use a boolean to determin if a file needs to be reset. We want to reset
the file when discrading changes if there is a conflict.
2019-07-27 11:05:23 +10:00
Giorgio PreviteraandJesse Duffield 823b436b53 477 Remove duplicate checkout
We already checout the file calling `c.DiscardUnstagedFileChanges`
2019-07-27 11:05:23 +10:00
Giorgio PreviteraandJesse Duffield 212327d746 #477 Discard changes when there are merge conflicts
If there are merge conflicts, reset the file and discard all changes
2019-07-27 11:05:23 +10:00
Christian MuehlhaeuserandJesse Duffield cc138fc70e Simplified boolean comparison 2019-07-27 10:55:21 +10:00
Christian MuehlhaeuserandJesse Duffield 975a5315b0 Simplified code a bit 2019-07-27 10:52:06 +10:00
haoweiandJesse Duffield e1f5601d4b fix typo 2019-07-14 14:24:59 +10:00
Jesse Duffield 3e40369fd2 add GIT_OPTIONAL_LOCKS=0 env var to all commands 2019-06-06 20:53:35 +10:00
Jesse Duffield 0f0fda1660 allow stashing staged changes
reinstate old stash functionality with the 's' keybinding
2019-06-06 20:50:19 +10:00
Jesse Duffield c61bfbdd4c Support opening lazygit in a submodule 2019-05-12 17:59:49 +10:00
Jesse Duffield 5a0d0bb299 support resetting to a commit in either soft, hard, or mixed mode 2019-05-06 22:44:38 +10:00
Suhas KaranthandJesse Duffield e09aac6450 Improve directory check for .git
Return error if the .git exists but is not a directory. This provides a
slightly better failure message for git repo with submodules in case
the '.git' is a file which provides the reference to the parent's .git
folder with the submodule inside.
2019-05-06 21:37:42 +10:00