1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
Commit Graph

1450 Commits

Author SHA1 Message Date
Birger Skogeng Pedersen
555d8bbc96 set repo name as window title when loading repo, fix #1691 2022-01-21 23:13:39 +11:00
Jesse Duffield
b6fb7f1365 fix integration test 2022-01-18 21:25:52 +11:00
Jesse Duffield
d019626342 do not show branch graph when in filtering mode 2022-01-17 22:00:53 +11:00
Jesse Duffield
595aca2a4b make integration test pass 2022-01-17 19:14:59 +11:00
Jesse Duffield
2691477aff allow sandbox mode with integration tests 2022-01-17 19:14:59 +11:00
Jesse Duffield
99035959a1 fix merge scroll bug 2022-01-16 23:16:05 +11:00
Jesse Duffield
0092c9d08d fix bug with subprocess 2022-01-16 03:32:09 +00:00
Jesse Duffield
befa35645e fix bug which prevented quitting with confirm 2022-01-15 20:35:25 +11:00
Jesse Duffield
1c84f77319 always specify upstream when pushing/pulling 2022-01-15 15:34:01 +11:00
Jesse Duffield
8d8bdb948b avoid deadlock in merge panel 2022-01-15 14:15:41 +11:00
Jesse Duffield
cdcfeb396f stop refreshing the screen so much 2022-01-15 14:15:41 +11:00
Jesse Duffield
8263d15b03 fix issue where custom command would not open a menu 2022-01-15 10:14:19 +11:00
Jesse Duffield
2436ff197a fewer panics 2022-01-09 14:14:47 +11:00
Jesse Duffield
e5096e71ab add integration test for discarding old files 2022-01-09 14:14:47 +11:00
Jesse Duffield
ceb927fec0 fix formatting 2022-01-09 14:14:47 +11:00
Jesse Duffield
0dfd02c42d allow rewording old commits 2022-01-09 14:14:47 +11:00
Jesse Duffield
ee15202207 add newline after message because it looks like the message doesn't appear otherwise for some reason 2022-01-09 14:09:53 +11:00
Jesse Duffield
18f48a43d5 add some more linters 2022-01-09 14:09:53 +11:00
Jesse Duffield
fdf79fdeee fix bug that caused credentials popup to be raised unexpectedly 2022-01-09 14:09:53 +11:00
Jesse Duffield
0dd1c12e2f fix format issue 2022-01-09 14:09:53 +11:00
Jesse Duffield
364c5db19c shorten name 2022-01-09 14:09:53 +11:00
Jesse Duffield
c9a0cc6b30 refactor 2022-01-09 14:09:53 +11:00
Jesse Duffield
3621854dc7 fix tests 2022-01-09 14:09:53 +11:00
Jesse Duffield
ee8ff6512f trim down gitcommand struct some more 2022-01-09 14:09:53 +11:00
Jesse Duffield
610e503296 refactor git flow 2022-01-09 14:09:53 +11:00
Jesse Duffield
e92076d2c2 start removing direct calls to cmd.New from gui 2022-01-09 14:09:53 +11:00
Jesse Duffield
3f44eac95b remove repo field 2022-01-09 14:09:53 +11:00
Jesse Duffield
946a35b59d remove OSCommand field 2022-01-09 14:09:53 +11:00
Jesse Duffield
f503ff1ecb start breaking up git struct 2022-01-09 14:09:53 +11:00
Jesse Duffield
48a4565d1f remove log of error now that we're returning it normally 2022-01-07 11:01:42 +11:00
Jakob Kogler
ee7a6391a8 remove redundant commit 2022-01-07 11:01:42 +11:00
Jakob Kogler
68fc6059d3 rename variable to failedCommitMessage 2022-01-07 11:01:42 +11:00
Jakob Kogler
f981255a5b don't ignore error when commit with subprocess fails
If signing by GPG is enabled, the git commit command will be executed in
a subprocess, differently from when it is executed without GPG signing.
In case of an error, e.g. a failing pre-commit hook, the error needs to
be passed along, and not just ignored.
2022-01-07 11:01:42 +11:00
Jakob Kogler
beedc2553d remember the message if commit fails
In case a commit fails, e.g. because a pre-commit hook returns an error,
lazygit will now remember the commit message and will suggest it during
the next commit (e.g. after fixing the error of the pre-commit hook).
2022-01-07 11:01:42 +11:00
Jesse Duffield
0d3e5e6a1d simplify fetch 2022-01-07 10:52:51 +11:00
Jesse Duffield
93729ba61b fix some things 2022-01-07 10:52:51 +11:00
Jesse Duffield
91fe68576c refactor 2022-01-07 10:52:51 +11:00
Jesse Duffield
05fa483f48 simplify how we log commands 2022-01-07 10:52:51 +11:00
Jesse Duffield
6da6c1f2f2 small copy changes 2022-01-04 09:07:15 +11:00
Jesse Duffield
c82606a92a fix broken format call 2022-01-04 09:07:15 +11:00
Jesse Duffield
194ff1630c do dependency injection up front and in one place 2022-01-04 09:07:15 +11:00
Jesse Duffield
9c4a819683 refactor sync test 2022-01-04 09:07:15 +11:00
Jesse Duffield
547e0153ec stash and tags loaders 2022-01-04 09:07:15 +11:00
Jesse Duffield
44b6d26b10 move remotes loader into loaders package 2022-01-04 09:07:15 +11:00
Jesse Duffield
d69ce7a529 move reflog commit loader into loaders package 2022-01-04 09:07:15 +11:00
Jesse Duffield
9b2b0fc122 WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield
96c2887fd0 WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield
66e840bc3f more refactoring 2022-01-04 09:07:15 +11:00
Jesse Duffield
b028f37ba8 updating specs 2022-01-04 09:07:15 +11:00
Jesse Duffield
1fc0d786ae better typing for rebase mode 2022-01-04 09:07:15 +11:00
Jesse Duffield
43a4fa970d WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield
192a548c99 refactoring the config struct 2022-01-04 09:07:15 +11:00
Jesse Duffield
01ea5813a8 align Gui struct with GitCommand 2022-01-04 09:07:15 +11:00
Jesse Duffield
18ab086126 introduce Common struct for passing around common stuff 2022-01-04 09:07:15 +11:00
Jesse Duffield
b4c078d565 WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield
9ef65574db refactor to rename pull_request to hosting_service and apply SRP 2021-12-29 09:01:06 +11:00
Jesse Duffield
f89747451a allow opening a commit in the browser 2021-12-29 09:01:06 +11:00
Francisco Miamoto
8a76b5a4ee use custom handler only for branch commits context 2021-12-28 15:54:19 +11:00
Francisco Miamoto
1a7d0cd7ae add binding to go to bottom on lists
Related to #1584
2021-12-28 15:54:19 +11:00
Francisco Miamoto
8c8b925b3a set tag index directly
We can do this since they are already sorted by date created.
2021-12-26 17:08:31 +11:00
Francisco Miamoto
eff6c4283b change formatting for menu items 2021-12-26 17:08:31 +11:00
Francisco Miamoto
7888ff6cb9 set show cancel as true for tag menu 2021-12-26 17:08:31 +11:00
Francisco Miamoto
e7a005f44d update translations to match conventions 2021-12-26 17:08:31 +11:00
Francisco Miamoto
3e58797096 show tag menu for creation on tags tab 2021-12-26 17:08:31 +11:00
Francisco Miamoto
b1d6ccddfb support creating annotated tags 2021-12-26 17:08:31 +11:00
Marius Bergmann
38743ec99f Suggest existing remote for non-tracking branch
Currently, when pushing or pulling a branch that has no tracking remote,
lazygit suggests the (hard-coded) remote named 'origin'. However, a
repository might not have a remote with this name, in which case the
suggestion makes no sense. This happens to me quite regularly when I
choose a more meaningful name than 'origin' for a remote.

This change keeps the current behavior by suggesting 'origin' when there
is either a remote with that name or no remote at all. However, when
'origin' does not exist, the name of the first remote is suggested.

Suggest existing remote for non-tracking branch

Currently, when pushing or pulling a branch that has no tracking remote,
lazygit suggests the (hard-coded) remote named 'origin'. However, a
repository might not have a remote with this name, in which case the
suggestion makes no sense. This happens to me quite regularly when I
choose a more meaningful name than 'origin' for a remote.

This change keeps the current behavior by suggesting 'origin' when there
is either a remote with that name or no remote at all. However, when
'origin' does not exist, the name of the first existing remote is
suggested.
2021-12-26 15:47:58 +11:00
Mark Sagi-Kazar
fdf0d4a2c3 implement signoff
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-12-25 12:01:55 +11:00
Cokile
76e6745526 fix typo 2021-12-25 11:54:27 +11:00
Cokile
3771f9c98b support config unified color for commit authors 2021-12-25 11:54:27 +11:00
Jesse Duffield
18283ad41b add popup handler for easier testing 2021-12-06 22:37:28 +11:00
Jesse Duffield
1996eddd91 more efficient context diff size changing 2021-12-06 22:37:28 +11:00
DerTeta
de0e885c65 Refresh staging- or patch building panel when rendering their respective context 2021-12-06 22:37:28 +11:00
DerTeta
f7ffbbd72a Add a menu entry and keybinding to { for decreasing the context size 2021-12-06 22:37:28 +11:00
DerTeta
0fbde05928 Add a menu item and keybinding to } to increase the context size 2021-12-06 22:37:28 +11:00
DerTeta
ba844c18a5 Add the DecreaseContextInDiffView function 2021-12-06 22:37:28 +11:00
DerTeta
e1cf6912db Add the IncreaseContextInDiffView function 2021-12-06 22:37:28 +11:00
DerTeta
3e3151f86a Fix: Don't access a view if it's nil
The way the `if` expression in `deactivateContext` was composed,
it was possible to have it to evaluate to `true` even though the
`view` variable was `nil`.

As far as I can tell, this seems to be only possible during tests.
Nonetheless, I think the expression looks more "correct" this way.
2021-12-06 22:37:28 +11:00
Jesse Duffield
02bf6a5c17 fix delta again 2021-11-22 21:07:04 +11:00
Jesse Duffield
2f45db8f7c fix scrolling in sub commits panel 2021-11-10 08:54:14 +11:00
Jesse Duffield
1d40d03bb2 refactor 2021-11-05 07:58:21 +11:00
Jesse Duffield
9a9e3d506d more consistent rendering 2021-11-05 07:58:21 +11:00
Jesse Duffield
06ca71e955 fix bug 2021-11-05 07:58:21 +11:00
Jesse Duffield
ccd80a0e4b add menu options for log stuff 2021-11-05 07:58:21 +11:00
Jesse Duffield
37be9dbea1 support scrolling left and right 2021-11-05 07:58:21 +11:00
Jesse Duffield
f6ec7babf5 add some config 2021-11-05 07:58:21 +11:00
Jesse Duffield
802cfb1a04 render commit graph 2021-11-05 07:58:21 +11:00
Jesse Duffield
2fc1498517 some refactoring in anticipation of the graph feature 2021-11-01 10:03:49 +11:00
Jesse Duffield
7a464ae5b7 add graph algorithm 2021-11-01 10:03:49 +11:00
Jesse Duffield
927ee63106 support aborting a merge or rebase with esc 2021-11-01 09:18:30 +11:00
Jesse Duffield
c47c539e12 support user-configurable author colours 2021-10-30 18:26:06 +11:00
Jesse Duffield
7561703e8d move author name colouring code into its own file 2021-10-30 18:26:06 +11:00
Jesse Duffield
e122f421e6 only use a single initial for double sized runes 2021-10-30 18:26:06 +11:00
Ryooooooga
6171690b00 Fix multibyte initial characters 2021-10-30 18:26:06 +11:00
Jesse Duffield
253504a094 associate random colours with authors 2021-10-30 18:26:06 +11:00
Jesse Duffield
f704707d29 stream output from certain git commands in command log panel 2021-10-30 18:26:06 +11:00
Jesse Duffield
01d82749b1 fix commit message prefix thingo 2021-10-25 22:40:15 +00:00
Jesse Duffield
3eb124c732 easier hiding of command log 2021-10-23 12:54:57 +11:00
Jesse Duffield
ef544e6ce9 add more suggestions 2021-10-23 12:29:52 +11:00
Jesse Duffield
629494144f show suggestions when typing in an origin 2021-10-23 12:29:52 +11:00
Jesse Duffield
b6a5e9d615 use cached git config 2021-10-23 10:26:47 +11:00
Sam Burville
5df0475612 Add variable to simplify JumpToBlock keybinding
This removes the magic '5' and instead uses the number of windows.
2021-10-22 22:38:26 +11:00
Sam Burville
f6e316dfe5 Improve JumpToBlock keybinding functionality
Improve experience when yaml file has != 5 keybindings and change view
helper to use the length of the array instead of hardcoded value.
2021-10-22 22:38:26 +11:00
Sam Burville
91e8765d9c Add JumpToBlock keybinding
This should allow users to decide their own keybinding for jumping
between blocks/panels.
E.g. A user could choose 5-9 instead of 1-5.
2021-10-22 22:38:26 +11:00
Jesse Duffield
80a8e9b04d fix merge conflict scrolling 2021-10-22 22:16:52 +11:00
Jesse Duffield
2008c39516 add tests for dealing with remotes 2021-10-22 21:33:17 +11:00
Jesse Duffield
6388af70ac simplify pull logic 2021-10-22 21:33:17 +11:00
Jesse Duffield
5ee559b896 fix issue where upstream origin and branch were quoted together
fix issue where upstream origin and branch were quoted together
2021-10-20 09:29:17 +11:00
Jesse Duffield
ca7252ef8e suggest files when picking a path to filter on
async fetching of suggestions

remove limit

cache the trie for future use

more

more
2021-10-19 09:02:42 +11:00
Jesse Duffield
a05f22efa2 support home/end keys in editors 2021-10-17 20:14:31 +11:00
Jesse Duffield
c0cd9dd835 stop opening suggestions tab when no suggestions present 2021-10-17 20:05:09 +11:00
Jesse Duffield
305f211615 surface error when trying to set upstream 2021-10-17 09:00:08 +00:00
Jesse Duffield
d672b7342f stop resetting scroll all the time 2021-10-17 19:45:57 +11:00
Jesse Duffield
e7c27b6f4a small fixes 2021-10-17 06:41:21 +00:00
Jesse Duffield
345c90ac05 fix editor 2021-10-17 04:17:59 +00:00
Jesse Duffield
87e9d9bdc2 minor changes 2021-10-16 21:18:43 +11:00
Hrishikesh Hiraskar
b6454755ca copy selected text to clipboard 2021-10-16 21:18:43 +11:00
Jesse Duffield
3621084096 small changes 2021-10-16 12:22:34 +11:00
Jesse Duffield
d02e52989e small changes 2021-10-16 12:22:34 +11:00
mjarkk
913a2fd065 Allow having multiple config files 2021-10-16 12:22:34 +11:00
Sam Burville
c5f7ad5adb Make cherry pick commit color customisable
Two new settings in the config, which allow the cherry picked
foreground and background to be custom colors.

Issue #856
2021-09-30 01:26:05 +10:00
Jesse Duffield
ab0117c416 fix some encodings 2021-09-27 19:58:24 +10:00
Jesse Duffield
652c97d239 honour options menu press 2021-09-27 19:41:38 +10:00
black_desk
66d0fd2133 Format code to pass lint 2021-09-16 21:38:43 +08:00
Ryooooooga
57f7051590
Fix deletion of unmerged branches in languages other than English 2021-09-04 21:01:38 +09:00
codesoap
c1d2aa61f3 Fix misspells 2021-09-01 22:51:24 +02:00
Dwarven YANG
63072af5bc allow user to configure the gui language 2021-08-30 09:12:29 +10:00
Jesse Duffield
44d08edfb0 Address feedback 2021-08-25 22:23:55 +10:00
Jesse Duffield
f08fdb2873 Minor refactor 2021-08-25 22:23:55 +10:00
Ryooooooga
df4eb70ba2 Fix translations 2021-08-25 22:23:55 +10:00
Ryooooooga
6ca42ff720 Fix pick all hunks 2021-08-25 22:23:55 +10:00
Ryooooooga
a533f8e1a5 simplify merge panel logic 2021-08-25 22:23:55 +10:00
Ryooooooga
cf8ded0b79 add mergeConflict#hasAncestor 2021-08-25 22:23:55 +10:00
Ryooooooga
73548fa15f Fix conflict resolution 2021-08-25 22:23:55 +10:00
Ryooooooga
a0e7604f61 Support git config merge.conflictStyle diff3 2021-08-25 22:23:55 +10:00
Liberatys
711bd5a670 Lint 2021-08-25 20:13:50 +10:00
Liberatys
6b68f4f25d Update as per review and add tests 2021-08-25 20:13:50 +10:00
Liberatys
89ee0a1dee Move field names to translation 2021-08-25 20:13:50 +10:00
Liberatys
2dc6f5f079 Implement state filtering for commit files 2021-08-25 20:13:50 +10:00
Mark Kopenga
487ad196a7
Merge pull request #1413 from Ryooooooga/feature/edit-line
Make os.editCommand customizable using template
2021-08-23 10:15:38 +02:00
Ryooooooga
0af0e66586
Fix panic in merge conflict 2021-08-21 18:34:30 +09:00
mjarkk
e58376f9f7 add tests for TemplateFuncMapAddColors 2021-08-09 21:09:52 +02:00
Elwardi
e8e4fa5957 Add color functions to templates funcMaps 2021-08-09 11:52:00 +01:00
Elwardi
b5d8849c06 Support match colors in labelFormat entry in menuFromCommand prompts 2021-08-07 16:06:36 +01:00
Mark Kopenga
5d1a9639b6
Merge pull request #1416 from FoamScience/feature_menuOptions 2021-08-07 15:24:42 +02:00
mjarkk
ea136e4e77 Improve code quality
- Make CommandMenuEntry private
- create candidates only once we really need it
- Use only 1 buffer
- Clearify CommandMenuEntry creation fields
2021-08-06 21:50:58 +02:00
Elwardi
dcd3b7c058 Show only labels in menuFromCommand prompts 2021-08-06 18:38:26 +01:00
Elwardi
906ec30cac Minor changes to menuFromCommand prompts 2021-08-06 10:53:32 +01:00
Matthew Garelli
46c146a8c1 fixed test failing due to ForceSetColorLevel in pkg/gui/style/style_test.go 2021-08-06 02:18:04 -07:00
Elwardi
a8ec044f0e Make menuFromCommand format menu items and their description 2021-08-05 15:45:18 +01:00
Ryooooooga
ac609bd37c
fix backward compatibility 2021-08-04 18:43:34 +09:00
Ryooooooga
67cc65930a
fix out of range error 2021-08-03 22:00:28 +09:00
Ryooooooga
4f66093335
introduce edit command template to open a specifig line of a file 2021-08-03 21:42:14 +09:00
Jesse Duffield
d626bcac00 color fixups 2021-08-01 16:14:56 +10:00
Jesse Duffield
e798aa4b15 more color tests 2021-08-01 13:21:06 +10:00
mjarkk
0662733ad9 add tests for color changes 2021-07-31 20:53:49 +02:00
Jesse Duffield
550c0fd4dc refactor 2021-07-31 17:56:47 +10:00
Jesse Duffield
0bc0e4ac88 more efficient 2021-07-31 17:33:20 +10:00
Jesse Duffield
117c0bd4f7 simplify code a bit 2021-07-31 17:33:13 +10:00
mjarkk
79848087bc Switch to github.com/gookit/color for terminal colors 2021-07-30 15:14:46 +02:00
Jesse Duffield
62393cf28a more treeish files 2021-07-27 21:52:42 +10:00
Jesse Duffield
b81bac3d65 more i18n 2021-07-27 21:30:08 +10:00
Jesse Duffield
58ddbae4d1 Minor refactor 2021-07-27 21:30:08 +10:00
Denis Palashevskii
3802b563b0 Add error message if target branch not found with prompt 2021-07-27 21:30:08 +10:00
Denis Palashevskii
d1134daa53 review fixes: PR URL refactoring, target branch selection prompt 2021-07-27 21:30:08 +10:00
Denis Palashevskii
bccf203a18 Fix menu item color 2021-07-27 21:30:08 +10:00
Denis Palashevskii
b590397dce Update docs 2021-07-27 21:30:08 +10:00
Denis Palashevskii
0e6598adbd Implement pull request options menu 2021-07-27 21:30:08 +10:00
Mark Kopenga
eec20b845d
Merge pull request #1392 from mjarkk/parcally-fix-1385
Change the way file statuses are loaded
2021-07-26 11:22:14 +02:00
mjarkk
fc76b44b45 correctly show files with special chars in commit 2021-07-23 12:04:23 +02:00
mjarkk
9a087d04eb Change the way file statuses are loaded
This makes it so file statuses recived from git no longer get joined
before spliting them again.
2021-07-22 22:12:43 +02:00
mjarkk
713fae3e32 format code 2021-07-22 19:45:43 +02:00
Elwardi
148bf2c070 Add test for GenerateMenuCandidates from Custom Commands 2021-07-22 15:44:16 +01:00
Elwardi
edfb0a26b2 Refactor code around handleCustomCommandKeybinding 2021-07-20 20:59:03 +01:00
Elwardi
f70435a20f Better format error catching in menuFromCommand prompts 2021-07-19 13:41:42 +01:00
Elwardi
b92ff3ee3f Consider first match only in menuFromCommand prompt 2021-07-19 13:06:00 +01:00
Elwardi
f1ced5539a Add option to format filter matches to menuFromCommand prompts 2021-07-19 11:46:29 +01:00
Elwardi
77e9ee64a4 Apply suggestions from @mjarkk for menyFromCommands 2021-07-18 18:42:42 +01:00
Elwardi
9daa47fb2d Add docs for menuFromCommand prompts 2021-07-18 10:36:01 +01:00
Elwardi
d18c8c8dc3 Add prompt type: menuFromCommand 2021-07-18 10:36:00 +01:00
mjarkk
fc066d2f2e parse github emoji config option 2021-07-16 14:06:01 +02:00
Davyd McColl
35f1ccdb1b ♻️ temporarily bypass ignore whitespace for diff view instead of turning the toggle off completely 2021-07-01 17:13:14 +10:00
Davyd McColl
b80fafef02 🎨 properly ignore the result 2021-07-01 17:13:14 +10:00
Davyd McColl
130480555f always show whitespace in diffs when entering line-by-line staging 2021-07-01 17:13:14 +10:00
Davyd McColl
92cc6e883d 🚚 move whitespace toggle out of quitting.go 2021-07-01 17:13:14 +10:00
Davyd McColl
107503c903 🎨 alternative syntax 2021-07-01 17:13:14 +10:00
Davyd McColl
16dcc8f4db implement feedback when toggling whitespace 2021-07-01 17:13:14 +10:00
Davyd McColl
22a6771e51 🎨 run go fmt against the file directly ftw 2021-07-01 17:13:13 +10:00
Davyd McColl
a9f04d3925 facilitate toggling whitespace in the diff view with a hotkey (c-w by default) 2021-07-01 17:13:13 +10:00
Daniel Ebrahimian
0c3132c6f0
Fix typo in random tip 2021-06-28 11:03:54 +10:00
Cristian Betivu
39c8577074 Use static context 2021-06-16 15:00:17 +10:00
Cristian Betivu
0c2d90a444 Add comment 2021-06-16 15:00:17 +10:00
Cristian Betivu
0c135515a5 Use parent view for tab navigation 2021-06-16 15:00:17 +10:00
Emiliano Ruiz Carletti
b4e6850f98 Fix wrong ff-only configuration 2021-06-15 08:31:07 +10:00
Emiliano Ruiz Carletti
c57a0077d0 Read pull mode from gitconfig lazily 2021-06-15 08:31:07 +10:00
Jesse Duffield
ce7cbe58a0 naming change 2021-06-14 18:17:08 +10:00
Andrei Yangabishev
7588d5290b ShowTotal flag 2021-06-10 12:43:05 +03:00
Jesse Duffield
9fdf92b226 more refactoring
WIP

WIP
2021-06-06 09:12:49 +10:00
Jesse Duffield
93bf691fd6 refactoring 2021-06-06 09:12:49 +10:00
Jesse Duffield
fb395bca6e support reverting merge commits 2021-06-05 22:15:51 +10:00
Jesse Duffield
f91adf026b fix lbl scrolling 2021-06-05 13:54:05 +10:00