News for hackers. Stuff that matters.
Re:Git cherry-pick and revert use 3-way merge by chx on Friday November 10, 2023 @02:32PM (#38223406)
What would be the difference between

git show -U1000000000 $hash > x.patch; git apply x.patch

and

git cherry-pick $hash

for files less than 1000000000 lines?

Re:Git cherry-pick and revert use 3-way merge by coryrc on Friday November 10, 2023 @03:17PM (#38223967)
3-way merge has more information available to avoid some conflicts that would have to be manually resolved with the patch. Otherwise, you got the idea.
Re:Git cherry-pick and revert use 3-way merge by chx on Saturday November 11, 2023 @04:47AM (#38228840)
> 3-way merge has more information available

that was my question :) what information?

Re:Git cherry-pick and revert use 3-way merge by coryrc on Saturday November 11, 2023 @01:17PM (#38232907)
Patch lacks the diff from original commit to the commit-having-patch-applied-to. So if the name of a function referenced in the patch changed between those two, it will fail to apply, yet 3-way merge could continue. Additionally patch is very simplistic.