jesseduffield.lazygit/pkg/gui
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
..
context Fall back to WithWaitingStatus if item is scrolled out of view 2023-12-10 16:03:25 +01:00
controllers Warn when there are hunks with only added lines 2024-01-10 09:11:40 +01:00
filetree Fall back to WithWaitingStatus if item is scrolled out of view 2023-12-10 16:03:25 +01:00
keybindings Add disabled compat for user config (#2833) 2023-10-09 22:34:50 +03:00
mergeconflicts migrate patch building tests 2023-02-25 21:37:16 +11:00
modes Add a "Mark commit as base commit for rebase" command 2023-07-31 08:41:41 +02:00
patch_exploring Stop cycling hunks when reaching the end 2023-08-15 11:40:40 +02:00
popup Add WithWaitingStatusSync 2023-12-09 15:28:40 +01:00
presentation feat: add age on stash lines 2023-12-27 11:21:49 +01:00
services/custom_commands Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00
status Pass "now" into utils.Loader 2023-10-16 09:03:07 +02:00
style Stop hiding underscores for VSCode 2023-06-01 20:12:20 +10:00
types Fall back to WithWaitingStatus if item is scrolled out of view 2023-12-10 16:03:25 +01:00
background.go Ensure background refreshes don't bunch up 2023-07-10 17:30:44 +10:00
command_log_panel.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
context.go Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00
context_config.go move some methods 2023-04-30 13:19:53 +10:00
controllers.go Add command to find base commit for creating a fixup 2024-01-10 09:11:40 +01:00
dummies.go feat: add GitVersion struct 2022-12-30 20:01:14 +09:00
editors.go Add emacs-keybinds for word navigation 2023-08-15 12:22:17 +02:00
extras_panel.go Extract a SaveAppStateAndLogError function 2023-09-04 17:50:49 +02:00
global_handlers.go Add demo test variant 2023-07-31 22:33:04 +10:00
gui.go Add WithWaitingStatusSync 2023-12-09 15:28:40 +01:00
gui_common.go Add WithInlineStatus helper function 2023-10-08 18:45:36 +02:00
gui_driver.go Add a Click() primitive to the integration test library 2023-08-07 15:10:28 +01:00
information_panel.go If OpenLink errors, show a dialog instead 2023-08-09 13:12:40 +01:00
keybindings.go Add Enabled func to Binding 2023-09-18 10:20:23 +02:00
layout.go Rerender certain views when their width changes 2023-10-16 09:03:07 +02:00
main_panels.go Return only visible views from TopViewInWindow 2023-12-10 15:57:51 +01:00
menu_panel.go Remove the magenta color on menu items that open a menu 2023-08-29 08:04:47 +02:00
options_map.go Add demo test variant 2023-07-31 22:33:04 +10:00
pty.go Use a PTY when calling external diff command 2023-11-22 12:08:05 +01:00
pty_windows.go Format code to pass lint 2021-09-16 21:38:43 +08:00
recent_repos_panel.go Use forward-slashes on windows 2023-07-30 18:35:24 +10:00
tasks_adapter.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
test_mode.go Disable the 40-second timeout for integration tests when debugging 2023-09-28 10:03:53 +02:00
view_helpers.go Log duration of post-refresh-update call 2023-07-29 09:39:22 +10:00
views.go Layout the bottom line view using spacer views 2023-12-09 11:18:28 +01:00