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

2639 Commits

Author SHA1 Message Date
Jesse Duffield
e1c376ef54
Merge pull request #2453 from stefanhaller/allow-rebasing-to-first-commit 2023-02-20 19:21:37 +11:00
Jesse Duffield
0b55eaca1d add create tag from commit test 2023-02-20 19:01:08 +11:00
Jesse Duffield
ee8c31880c add reset to tag test 2023-02-20 19:01:08 +11:00
Jesse Duffield
daf8176dd7 add tag checkout test 2023-02-20 19:01:08 +11:00
Jesse Duffield
082d342bf8 add tag tests 2023-02-20 19:01:08 +11:00
Jesse Duffield
39c56553b3 show tag message 2023-02-20 19:01:08 +11:00
Stefan Haller
c5cd217a65 Allow squashing fixups above the first commit of a repo
This includes amending changes into a given commit, since that's implemented in
terms of the former.
2023-02-20 08:29:43 +01:00
Jesse Duffield
9e2a3a87dd improved commit test 2023-02-20 18:20:23 +11:00
Jesse Duffield
ac580ae6a0 migrate undo2 2023-02-20 18:20:23 +11:00
Jesse Duffield
9e1e20fef2
Merge pull request #2421 from Ryooooooga/tag-on-branch 2023-02-20 18:20:16 +11:00
Jesse Duffield
4b49bd406f
Update pkg/integration/tests/branch/create_tag.go 2023-02-20 17:58:08 +11:00
Stefan Haller
7351907474 Add integration tests for rebasing to the initial commit 2023-02-20 07:40:05 +01:00
Stefan Haller
a349e886ce Allow interactive rebasing all the way down to the first commit
Pass --root instead of a sha when we want to rebase down to the initial commit.
2023-02-20 07:40:05 +01:00
Stefan Haller
dd61c49a15 Better error message for trying to squash or fixup the first commit
It's not so much the total number of commits that matters here, it's just
whether we are on the first one. (This includes the other condition.)

This allows us to get rid of the condition in rebase.go.
2023-02-20 07:40:04 +01:00
Stefan Haller
ac9515d8c7 Revert "fix: improve backward compatibility"
Since we now require git 2.20, we don't need this any more.

This reverts commit 7c5f33980f.
2023-02-19 16:13:31 +01:00
Ryoga
72a92d748f
test: fix TagNamesAt
Co-authored-by: Jesse Duffield <jessedduffield@gmail.com>
2023-02-19 23:35:38 +09:00
Ryooooooga
36c2b00336
test: add an integration test for creating tag on branches 2023-02-19 23:35:38 +09:00
Ryooooooga
67b08ac239
feat: support to create tag on branch 2023-02-19 23:31:46 +09:00
Stefan Haller
67b8ef449c Edit by breaking after current commit
Instead of rebasing from the commit below the current one and then setting the
current one to "edit", we rebase from the current one and insert a "break" after
it. In most cases the behavior is exactly the same as before, except that the
new method also works if the current commit is a merge commit. This is useful if
you want to create a new commit at the very beginning of your branch (by editing
the last commit before your branch).
2023-02-19 10:21:01 +01:00
Stefan Haller
bb856ad7c6 Bump minimum required git version to 2.20
We need this because the next commit is going to make use of the "break"
interactive rebase instruction, which was added in 2.20.
2023-02-19 10:20:14 +01:00
Jesse Duffield
65bd0ab431 migrate undo test 2023-02-19 15:48:09 +11:00
Jesse Duffield
93b9e1bd19 migrate merge conflict undo test 2023-02-19 15:48:09 +11:00
Jesse Duffield
a51f64814c show snapshot of lazygit when test fails for easier investigation 2023-02-19 15:48:09 +11:00
Jesse Duffield
b5e325b0a4 migrate revert merge test 2023-02-19 15:48:09 +11:00
Jesse Duffield
88c76868ba migrate initial open test 2023-02-19 15:48:09 +11:00
Jesse Duffield
13ee0f0a5d migrate open to branches with cli arg test 2023-02-19 15:48:09 +11:00
Jesse Duffield
76a1b501f2 migrate more force push tests 2023-02-19 15:48:09 +11:00
Jesse Duffield
7201a91b69 remove unneeded config setting 2023-02-19 13:51:37 +11:00
Jesse Duffield
31d796ee75 migrate forcePush integration test 2023-02-19 13:38:15 +11:00
Jesse Duffield
b0383ba73a update readme 2023-02-19 12:42:48 +11:00
Jesse Duffield
a3096e720c migrate pullAndSetUpstream test 2023-02-19 12:42:48 +11:00
Jesse Duffield
c599aaed51 migrate pull integration test 2023-02-19 11:48:21 +11:00
Jesse Duffield
f999bbce7c add code generator for creating tests list 2023-02-19 11:48:09 +11:00
Jesse Duffield
bff076c70a rename key to Pull 2023-02-19 11:42:00 +11:00
Stefan Haller
979c3d6278
Fix yellow/red coloring of pushed/unpushed commits in branch commits panel (#2448) 2023-02-19 10:13:46 +11:00
stk
4d39668743 Undo a change made in #2444 that we didn't end up needing 2023-02-18 09:53:31 +01:00
Jesse Duffield
c517d1e0a2 update view cursor when selecting new line in patch explorer view 2023-02-18 10:19:34 +11:00
stk
8cad8cda8f Don't bother setting view cursor pos for staging/stagingSecondary views
Now that the cursor highlight is never shown (see previous commit), there's no
reason to update the cursor position any more.
2023-02-15 21:32:21 +01:00
stk
6b81e6adca Turn highlighting off in staging/stagingSecondary views
There are two reasons for doing this:
1. The view cursor position is often out of sync with the selected line; see
   first commit of this branch.
2. The highlighting is already turned off when the view loses focus, and never
   turned back on thereafter. So just turn it off from the start then.
2023-02-15 21:29:38 +01:00
stk
b499eba1a8 Select next stageable line correctly after staging a range of lines
We already have this very convenient behavior of jumping to the next stageable
line after staging something. However, while this worked well for staging
single lines or hunks, it didn't work correctly when staging a range of lines;
in this case we want to start searching from the first line of the range.
2023-02-15 21:29:00 +01:00
stk
97daec7228 Add test demonstrating selection bug when staging a range of lines
The selected line is not in the right position after staging a range of lines;
see next commit.
2023-02-15 21:28:05 +01:00
stk
ff2a799200 Make SelectedLine/SelectedLineIdx work in staging/stagingSecondary views
While we try to keep the view's cursor position in sync with the context state's
selectedLineIdx (at least when pressing up or down), there are enough situations
where the two run out of sync; for example when initially opening the view, or
after staging a hunk, or when scrolling the view using the wheel. While it would
be possible to fix these situations to keep them always in sync, it doesn't seem
worth it, because the view's cursor position isn't really used for anything
else. So we rather special-case the SelectedLine/SelectedLineIdx functions of
ViewDriver to query the context state's selectedLineIdx directly if it is a
patch explorer context.
2023-02-15 21:22:11 +01:00
Jesse Duffield
31fcec16d9
Merge pull request #2429 from stefanhaller/do-not-autosquash-in-regular-rebase 2023-02-15 20:21:08 +11:00
Jesse Duffield
09178a1276
Merge pull request #2435 from Ryooooooga/return-alt1 2023-02-14 20:53:42 +11:00
Jesse Duffield
3cfdae4116 migrate submodule reset test 2023-02-12 18:12:01 +11:00
Jesse Duffield
d7956c481d migrate submodule enter test 2023-02-12 18:12:01 +11:00
Jesse Duffield
7a3291a1f7 fix test 2023-02-12 18:12:01 +11:00
Jesse Duffield
08c2b46d04 better visibility for tui 2023-02-12 10:47:45 +11:00
Jesse Duffield
1c48842277 migrate submodule remove test 2023-02-12 10:47:45 +11:00
Jesse Duffield
010f6d7f6e migrate submodule add test 2023-02-12 10:47:41 +11:00
Ryooooooga
39c20bc634
chore: change to work return-alt1 on all views 2023-02-11 21:19:47 +09:00
Jesse Duffield
823d95a8c6
Merge pull request #2418 from jesseduffield/feature/copy-remote-branch-to-clipboard 2023-02-11 10:53:31 +11:00
Jesse Duffield
225cd3cc60
Merge pull request #2412 from Ryooooooga/disable-help-on-suggestions 2023-02-11 10:52:49 +11:00
Ryooooooga
984eb95cb7
chore: remove UNKNOWN_VIEW_ERROR_MSG 2023-02-10 21:26:51 +09:00
stk
1da762c295 Explicitly pass --no-autosquash when rebasing
This fixes the problem shown in the previous commit.
2023-02-09 18:21:11 +01:00
stk
e357c00d4d Add an integration test showing a problem with autosquash during normal rebase
For users who have the rebase.autoSquash git config set to true, any regular
rebase will squash fixups in addition to rebasing. Not good -- we'll fix that in
the next commit.
2023-02-09 17:35:20 +01:00
Ryooooooga
1be6c522d8
fix: disable menu key binding while displaying popup 2023-02-09 20:13:41 +09:00
Luka Markušić
8af59c3e6e Copy remote branch name to clipboard 2023-02-09 11:56:12 +01:00
Jesse Duffield
c713d19383
Merge pull request #2417 from stefanhaller/make_integration_tests_more_robust 2023-02-09 21:55:30 +11:00
Jesse Duffield
4f7324bad0
Merge pull request #2413 from stefanhaller/allow-ignore-whitespace-everywhere 2023-02-09 21:55:12 +11:00
Jesse Duffield
5e2254395a fix linting issue 2023-02-09 21:45:14 +11:00
stk
b243f30f48 Disable ~/.gitconfig when running integration tests
A global ~/.gitconfig file can have influence on how integration tests behave;
in my case, I had the option "merge.conflictStyle" set to "diff3", which made
the integration test "cherry_pick_conflict" fail because the diff was different
from what the test expected.

Make this more robust by telling git to ignore the global config file when
running tests.
2023-02-07 17:26:45 +01:00
stk
e57843d947 Add integration test for ignoring whitespace in diff 2023-02-07 13:33:10 +01:00
stk
5bb6198219 Allow ignoring whitespace in diff in commits panel 2023-02-07 12:14:29 +01:00
stk
bbaeab68e1 Better redrawing after toggling "ignore whitespace"
There's no need for refreshing anything; all that's needed is to re-focus the
selected list item. This way it will also work in other panels, which we are
about to add in the next commit.
2023-02-07 12:09:17 +01:00
stk
946c1dff99 Cleanup: remove extra space 2023-02-07 12:09:15 +01:00
stk
d838965a41 Make "Toggle whitespace in diff view" a global key binding
Since it is going to affect a number of views later in the branch, it's easier
to make it global than to find all views that are affected.
2023-02-07 09:25:38 +01:00
Jesse Duffield
469938ee9b
Merge pull request #2342 from knutwalker/override-git-sequence-editor-for-rebase 2023-02-05 13:52:35 +11:00
Ryooooooga
7bd0c779c7
fix: fix default color to be white 2023-02-03 23:36:59 +09:00
Jesse Duffield
c0e805718d
Merge pull request #2358 from phanithinks/#2319_default_screen_mode 2023-02-01 21:52:09 +11:00
Phanindra kumar Paladi
35c5f940a4 Fixing indent in user_config.go 2023-02-01 09:50:37 +05:30
Jesse Duffield
368d6437b8
Merge pull request #2373 from phanithinks/clipboard_patch_option_2357 2023-01-31 17:02:46 +11:00
Phanindra Kumar Paladi
01f0efb997
Merge branch 'master' into #2319_default_screen_mode 2023-01-29 10:25:14 +05:30
Phanindra kumar Paladi
d0851113d1 Skipping copy_patch_to_clipboard test case 2023-01-29 10:20:56 +05:30
Phanindra kumar Paladi
df58c75ca4 Fixed breaking integrtion tests(old) 2023-01-29 10:03:59 +05:30
Jesse Duffield
d8c7d47067
Merge pull request #2395 from stefanhaller/trailing-lf-when-copying-diff-lines 2023-01-29 14:19:29 +11:00
Jesse Duffield
f79a8c281f
Merge pull request #2398 from Ryooooooga/fix-detached-head
fix https://github.com/jesseduffield/lazygit/issues/1467
2023-01-29 14:19:05 +11:00
Jesse Duffield
996a1e469f
Merge pull request #2401 from Ryooooooga/disable-log-order 2023-01-29 14:05:31 +11:00
Jesse Duffield
18db5eafd4
Merge pull request #2384 from stefanhaller/disable-reword-in-editor-prompt 2023-01-29 13:43:23 +11:00
Ryooooooga
2183c157d4
feat(log): allow to disable git.log.order 2023-01-28 21:17:05 +09:00
Ryooooooga
5dec080719
fix: fix RefName of detached HEAD to works in Chinese 2023-01-27 20:45:18 +09:00
stk
fc38e3b54d Don't omit final line feed when copying diff lines to clipboard 2023-01-26 10:30:05 +01:00
stk
93d845cb01 Cleanup: remove unused function RenderPlain 2023-01-26 10:30:05 +01:00
stk
67fb28e2b8 Add user config gui.skipRewordInEditorWarning 2023-01-26 09:01:22 +01:00
Jesse Duffield
679b0456f3
Merge pull request #2388 from Ryooooooga/remove-unused-texts 2023-01-26 13:46:01 +11:00
Jesse Duffield
f7f24dbfc1 better test 2023-01-26 13:25:56 +11:00
Ryooooooga
069af50f50
chore(i18n): remove unused texts 2023-01-24 21:24:46 +09:00
Phanindra kumar Paladi
c6929c36ae Corrected test assert 2023-01-23 15:53:21 +05:30
Phanindra kumar Paladi
e8f4508cba Fixed integration test case 2023-01-23 15:48:43 +05:30
stk
b8d33b8f7b Extract helper function doRewordEditor
No behavior change, just a preparation for the next commit.
2023-01-22 15:59:32 +01:00
Phanindra kumar Paladi
946b8b5670 Fixed the lable in the custom_patch_options_panel.go 2023-01-18 21:13:31 +05:30
Phanindra kumar Paladi
d479a41cad Added Integration testing the copy to clipboard in patchbuilding 2023-01-18 21:05:40 +05:30
Ryooooooga
7149cfeb11
fix: fix ReplacePlaceholderString 2023-01-18 20:56:22 +09:00
Phanindra kumar Paladi
265cdde7bc Fixed typo 2023-01-18 10:14:48 +05:30
Phanindra kumar Paladi
e87fc4a229 Change key of clipboard copy 2023-01-18 05:50:47 +05:30
Phanindra kumar Paladi
f6f82091bc Added copy to clipboard option to the patch options 2023-01-17 09:07:07 +05:30
Phanindra kumar Paladi
a11e91e651 replaced 'screenMode' to 'windowSize' in config 2023-01-16 20:07:21 +05:30
Phanindra kumar Paladi
f4ccb68464 Added screenMode configuration to gui configuration 2023-01-11 16:51:46 +05:30
Ryooooooga
21f8857d36
refactor: simplify log format 2023-01-06 11:15:33 +09:00
Ryooooooga
965f7bfcb2
feat(config): change git.commit.verbose to accept "default" 2023-01-06 11:15:33 +09:00