pr-1359/jerry-skydio/jerry/revup/master/patch_ids-v4
tagged this
20 Oct 23:16
These patches add fixes and features to the "git patch-id" command, mostly discovered through our usage of patch-id in the revup project (https://github.com/Skydio/revup). On top of that I've tried to make general cleanup changes where I can. Summary: 1: Fixed a bug in the combination of --stable with binary files and header-only, and expanded the test to cover both binary and non-binary files. 2: Switch internal usage of patch-id in rebase / cherry-pick to use the stable variant to reduce the number of code paths and improve testing for bugs like above. 3: Fixed bugs with patch-id and binary diffs. Previously patch-id did not behave correctly for binary diffs regardless of whether "--binary" was given to "diff". 4: Fixed bugs with patch-id and mode changes. Previously mode changes were incorrectly excluded from the patch-id. 5: Add a new "--include-whitespace" mode to patch-id that prevents whitespace from being stripped during id calculation. Also add a config option for the same behavior. 6: Remove unused prefix from patch-id logic. V1->V2: Fixed comment style V2->V3: The ---/+++ lines no longer get added to the patch-id of binary diffs. Also added patches 3-7 in the series. V3->V3: Dropped patch7. Updated flag name to --verbatim. Updated commit message descriptions. Signed-off-by: Jerry Zhang jerry@skydio.com Jerry Zhang (6): patch-id: fix stable patch id for binary / header-only patch-id: use stable patch-id for rebases builtin: patch-id: fix patch-id with binary diffs patch-id: fix patch-id for mode changes builtin: patch-id: add --verbatim as a command mode builtin: patch-id: remove unused diff-tree prefix Documentation/git-patch-id.txt | 24 ++++--- builtin/log.c | 2 +- builtin/patch-id.c | 113 ++++++++++++++++++++++++--------- diff.c | 75 +++++++++++----------- diff.h | 2 +- patch-ids.c | 10 +-- patch-ids.h | 2 +- t/t3419-rebase-patch-id.sh | 63 +++++++++++++++--- t/t4204-patch-id.sh | 95 +++++++++++++++++++++++++-- 9 files changed, 287 insertions(+), 99 deletions(-) base-commit: 45c9f05c44b1cb6bd2d6cb95a22cf5e3d21d5b63 Submitted-As: https://lore.kernel.org/git/pull.1359.v4.git.1666307815.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.1359.git.1663653505.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.1359.v2.git.1663654859.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.1359.v3.git.1665737804.gitgitgadget@gmail.com
Assets 2
-
2022-10-20T23:16:55Z -
2022-10-20T23:16:55Z -