mirror of
https://github.com/RGBCube/serenity
synced 2025-06-14 16:32:07 +00:00

Given a set of lines from the file we are patching, and a patch itself, this function will try and locate where in the file to apply that patch, and write the result of patching that file (if successful) to the output stream.
16 lines
298 B
C++
16 lines
298 B
C++
/*
|
|
* Copyright (c) 2023, Shannon Booth <shannon.ml.booth@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Error.h>
|
|
#include <LibDiff/Forward.h>
|
|
|
|
namespace Diff {
|
|
|
|
ErrorOr<void> apply_patch(Stream& out, Vector<StringView> const& lines, Patch const& patch);
|
|
|
|
}
|