libexec/got-read-patch/got-read-patch.c


Log

Author Commit Date CI Message
Omar Polo db0dfdd7 2022-06-27T18:47:02 got patch: handle git-style diffs for the 3-way merge too tweak and ok stsp@
Omar Polo 497a5915 2022-06-27T18:47:02 handle blob ids without corresponding blob ids ok stsp@
Stefan Sperling 8469d821 2022-06-25T09:25:07 always show commit or tree IDs in diff header, in order to help 'got patch' The idea is that got patch can simply look for a line such as: commit - abcde1234567... to find the merge base commit ID to show in diff3 conflict markers. got log -p now displays commit IDs in its diff header, instead ofl tree or blob IDs. ok op@
Omar Polo d8b5af43 2022-06-19T11:51:33 use the commitid in the patch diff3 conflict header suggested by and ok stsp@
Omar Polo 55e9459f 2022-06-19T11:51:32 got patch: use diff3 to merge the changes Parse the "blob -" metadata in diffs produced by 'got diff' and use the original file for patching. Then, use the diff3 with the current version of the file to merge the differences. This solves many failures automagically or at least turns them into a conflict. ok/improvements stsp@
Omar Polo 35095610 2022-06-14T10:35:07 got patch: use ints for line offsets instead of longs ints have the advantage that their size is more likely to be the same across the various architecture supported by OpenBSD, thus introducing less possible differences. INT_MAX is still (at least) a few order of magnitudes higher than the patches we dealt with (even abnormal ones.) suggested by stsp@
Christian Weisgerber e45f7eba 2022-05-14T18:55:37 got patch: switch from fseek() to fseeko(), use unary minus while here ok op
Omar Polo be33dff7 2022-05-13T15:28:04 got patch: fail when reading empty hunks
Omar Polo 6b7665ac 2022-05-02T09:31:24 s/empty/done forgot in previous commit
Omar Polo d75b9573 2022-05-02T08:48:10 got-read-patch: rename `ok' variable and simplify the parsing a bit
Omar Polo f90b7a8c 2022-05-02T08:39:41 trailing whitespaces
Omar Polo 4379a9aa 2022-05-02T08:38:43 got patch: handle git-style rename diffs extend the support for git-style diffs to include the "pure rename" case, i.e. when a file is renamed without any edits. ok stsp@
Omar Polo b2832778 2022-04-23T10:39:47 got-read-patch: preserve all \ lines as a cheap optimization got-read-patch was sending only the "\ No newline at end of file" lines that follows an addition (a "+" line). To be able to reverse patches in the future got_patch needs to know about all of these lines instead. No functional changes intended. ok stsp@
Omar Polo 9d6cabd5 2022-04-07T09:28:59 got patch: allow to strip path components Move some bits from the libexec helper to the main process so we know if the patch was generated by git or not and finally document the automatic stripping of a/ and b/ prefixes added by git-diff(1). ok stsp@
Stefan Sperling e260f8ae 2022-03-22T11:55:38 fgetc() returns int, not char; fixes -Werror build on armv7
Omar Polo b3c57ab2 2022-03-22T11:20:46 got patch: handle "\ No newline at end of file"
Omar Polo 7a30b5cb 2022-03-20T08:54:45 got patch: prefer new name if not /dev/null and not a git-style diff This fixes a common issue when for e.g. generating patches with $ diff -u foo.orig foo where 'got patch' failed because 'foo.orig' has an 'unexpected status'. prodded by naddy, ok stsp
Omar Polo 46ebad13 2022-03-17T16:38:43 style
Omar Polo 423faaa6 2022-03-12T16:01:09 got-read-patch: plug memory leak
Omar Polo e9ce266e 2022-03-07T22:26:08 add `got patch' command for applying unified diffs