From: Phillip Wood Date: Tue, 01 Jul 2025 09:59:49 GMT Subject: Re: [PATCH v3 4/4] add-patch: add diff.context command line overrides Message-ID: In-Reply-To: Hi Leon On 28/06/2025 17:34, Leon Michalak via GitGitGadget wrote: > From: Leon Michalak > > +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