ladybird/Userland/DevTools
Shannon Booth f690807c5a LibDiff: Change underlying representation of Hunk to allow context
The existing hunk data structure does not contain any way to easily
store information about context surrounding the additions and removals
in a hunk. While this does work fine for normal diffs (where there is
never any surrounding context) this data structure is quite limiting for
other use cases.

Without support for surrounding context it is not possible to:
 * Add support for unified or context format to the diff utility to
   output surrounding context.
 * Be able to implement a patch utility that uses the surrounding
   context to reliably locate where to apply a patch when a hunk range
   does not apply perfectly.

This patch changes Diff::Hunk such that its data structure more closely
resembles a unified diff. Each line in a hunk is now either a change,
removal, addition or context.

Allowing hunks to have context inside of them exposes that HackStudio
heavily relies on there being no context in the hunks that it uses for
its' git gutter implementation. The fix here is simple - ask git to
produce us a diff that has no context in it!
2023-07-02 11:18:11 -06:00
..
GMLPlayground GMLPlayground: Add a Statusbar 2023-06-17 20:36:03 +02:00
HackStudio LibDiff: Change underlying representation of Hunk to allow context 2023-07-02 11:18:11 -06:00
Profiler LibGUI+Userland: Port StatusBar::text() and set_text functions to String 2023-06-15 13:53:22 +01:00
SQLStudio LibGUI+Userland: Use action text as a fallback in Action::status_tip() 2023-06-15 13:53:22 +01:00
UserspaceEmulator Kernel+LibCore+LibC: Split the mount syscall into multiple syscalls 2023-07-02 01:04:51 +02:00
CMakeLists.txt Userland: Remove "Inspector" program and related utilities 2023-04-25 14:48:40 +02:00