summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJerry Zhang <jerry@skydio.com>2022-10-24 20:07:43 +0000
committerJunio C Hamano <gitster@pobox.com>2022-10-24 15:44:20 -0700
commit2871f4d447214874e13cf764ab3a170c9d844ca2 (patch)
treea39a34152a3d1fd6732132fc602c191ef360ea99 /diff.c
parent93105aba6c4c8608b10c8ebe14b2313b3d347124 (diff)
builtin: patch-id: add --verbatim as a command mode
There are situations where the user might not want the default setting where patch-id strips all whitespace. They might be working in a language where white space is syntactically important, or they might have CI testing that enforces strict whitespace linting. In these cases, a whitespace change would result in the patch fundamentally changing, and thus deserving of a different id. Add a new mode that is exclusive of --stable and --unstable called --verbatim. It also corresponds to the config patchid.verbatim = true. In this mode, the stable algorithm is used and whitespace is not stripped from the patch text. Users of --unstable mainly care about compatibility with old git versions, which unstripping the whitespace would break. Thus there isn't a usecase for the combination of --verbatim and --unstable, and we don't expose this so as to not add maintainence burden. Signed-off-by: Jerry Zhang <jerry@skydio.com> fixes https://github.com/Skydio/revup/issues/2 Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions