]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs-apply: allow stgit users to force-apply a patch
authorDarrick J. Wong <djwong@kernel.org>
Thu, 20 Feb 2025 16:49:33 +0000 (08:49 -0800)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 26 Feb 2025 13:26:51 +0000 (14:26 +0100)
commite10c19979396bea2a0ea1d3ca265fa54467e7188
treec78183260d947e356af33a04a47b308fa1a4ced1
parent8682be1ab7fdb99940437bbedc27146664556d48
libxfs-apply: allow stgit users to force-apply a patch

Currently, libxfs-apply handles merge conflicts in the auto-backported
patches in a somewhat unfriendly way -- either it applies completely
cleanly, or the user has to ^Z, find the raw diff file in /tmp, apply it
by hand, resume the process, and then tell it to skip the patch.

This is annoying, and I've long worked around that by using my handy
stg-force-import script that imports the patch with --reject, undoes the
partially-complete diff, uses patch(1) to import as much of the diff as
possible, and then starts an editor so the caller can clean up the rest.

When patches are fuzzy, patch(1) is /much/ less strict about applying
changes than stg-import.  Since Carlos sent in his own workaround for
guilt, I figured I might as well port stg-force-import into libxfs-apply
and contribute that.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
tools/libxfs-apply