Hi Leon
On 28/06/2025 17:34, Leon Michalak via GitGitGadget wrote:
From: Leon Michalak <leonmichalak6@xxxxxxxxx>
+for cmd in add checkout restore 'commit -m file'
+do
+ test_expect_success "${cmd%% *} accepts -U and --inter-hunk-context" "
Looking at this again, I think the test bodies here and below should be
wrapped in single quotes because they are passed to eval and we want to
expand $cmd when the body is evaluated, not before. That would also
simplify the quoting inside the tests as we don't need to escape double
quotes. That's not your fault - you've just copied what I suggested before.
+test_expect_success 'The -U option overrides diff.context for "add"' '
+ test_config diff.context 8 &&
+ git add -U4 -p >output &&
+ test_grep ! "^ firstline" output
+'
Don't the tests above check this as they set diff.context and
diff.interhunkcontext and pass different values to -U and
--inter-hunk-context?
Thanks
Phillip