jesseduffield.lazygit/pkg/integration/tests
Stefan Haller b35f8776e1 Warn when there are hunks with only added lines
The algorithm works by blaming the deleted lines, so if a hunk contains only
added lines, we can only hope that it also belongs in the same commit. Warn the
user about this.

Note: the warning might be overly agressive, we'll have to see if this is
annoying. The reason is that it depends on the diff context size whether added
lines go into their own hunk or are grouped together with other added or deleted
lines into one hunk. However, our algorithm uses a diff context size of 0,
because that makes it easiest to parse the diff; this results in hunks having
only added lines more often than what the user sees. For example, moving a line
of code down by two lines will likely result in a single hunk for the user, but
in two hunks for our algorithm. On the other hand, being this strict makes the
warning consistent. We could consider using the user's diff context size in the
algorithm, but then it would depend on the current context size whether the
warning appears, which could be confusing. Plus, it would make the algorithm
quite a bit more complicated.
2024-01-10 09:11:40 +01:00
..
bisect Make bisect/basic.go test more concrete 2023-07-31 08:34:01 +02:00
branch Add integration test for local branch sort order 2023-12-27 15:25:29 +01:00
cherry_pick Allow cherry-picking commits during a rebase 2023-09-18 10:50:19 +02:00
commit Warn when there are hunks with only added lines 2024-01-10 09:11:40 +01:00
config Support matchers on integers in integration tests 2023-06-03 15:32:23 +10:00
conflicts Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
custom_commands Allow checking for merge conflicts after running a custom command 2023-07-13 18:40:34 +10:00
demo Add demo for diffing two commits 2023-08-12 17:24:05 +10:00
diff Add busy count for integration tests 2023-07-08 22:54:52 +10:00
file feat: introduce a copy menu into the file view 2023-12-07 08:30:03 +01:00
filter_and_search When refreshing models, re-apply active filter for the corresponding view 2023-10-10 08:37:30 +02:00
filter_by_path Use sentence case everywhere 2023-05-25 23:52:19 +10:00
interactive_rebase Improve prompts when amending commits 2023-09-01 18:55:16 +02:00
misc fixed typo in test description 2023-10-30 14:17:34 +01:00
patch_building feat: add os.copyToClipboardCmd to allow for a custom command #1055 (#2784) 2023-07-29 19:35:52 +10:00
reflog Don't show branch heads in reflog subcommits 2023-07-31 08:34:01 +02:00
shared Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
staging Fix the title and text (and variable names) of the Discard Changes prompt 2023-06-26 08:15:35 +02:00
stash feat: add age on stash lines 2023-12-27 11:21:49 +01:00
submodule Use sentence case everywhere 2023-05-25 23:52:19 +10:00
sync Show correct keybindings in force-push prompt 2023-07-31 11:38:52 +02:00
tag Fix checking out a tag when a branch with the same name exists 2024-01-09 14:18:35 +01:00
ui If OpenLink errors, show a dialog instead 2023-08-09 13:12:40 +01:00
undo Use sentence case everywhere 2023-05-25 23:52:19 +10:00
worktree Allow deleting remote tags/branches from local tag/branch views (#2738) 2023-08-10 17:39:26 +10:00
test_list.go Warn when there are hunks with only added lines 2024-01-10 09:11:40 +01:00
test_list_generator.go Make test_list_generator.go print what it's doing 2023-09-29 20:40:15 +02:00
tests.go Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00