From: Kristoffer Haugsbakk Date: Mon, 28 Sep 2026 15:53:56 GMT Subject: Re: [PATCH v2 2/2] format-patch: learn --[no-]range-diff-notes Message-ID: <69ff90da-875c-44c5-bf00-f53fa61a0482@app.fastmail.com> In-Reply-To: On Mon, Sep 28, 2026, at 17:35, Junio C Hamano wrote: > "Kristoffer Haugsbakk" writes: > >> On Sun, Sep 27, 2026, at 14:50, Junio C Hamano wrote: >>> kristofferhaugsbakk@fastmail.com writes: >>> >>>> diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh >>>> index ef92704de39..640c5dec52e 100755 >>>> --- a/t/t3206-range-diff.sh >>>> +++ b/t/t3206-range-diff.sh >>>> ... >>>> +# The '--range-diff-notes' has no effect but is allowed >>>> +test_expect_success 'format-patch --range-diff-notes=not-a-note (no --range-diff)' ' >>>> + test_when_finished "rm -f 000?-*" && >>>> + git format-patch --range-diff-notes=not-a-note --cover-letter \ >>>> + main..unmodified && >>>> + test_when_finished "rm -f 000?-*" && >>>> + test_file_not_empty 0000-cover-letter* && >>>> + test_grep ! "^Range-diff:" 0000-cover-letter* && >>>> + test_grep ! "## Notes " 0000-cover-letter* >>>> +' >>> >>> The second test_when_finished is redundant, I suspect. >> >> Oh yeah. If there is no Range-diff then >> there won't be a notes section. I'll fix that >> in the next version. > > I do not understand that comment. I was merely saying that you are > registering the same clean-up-when-we-are-done handler twice. > Having the earlier invocation of "test_when_finished rm -f 000?-*" > shoud be sufficient. It does not make a difference whether we have > notes in the range-diff or not. Yeah. For some reason in my head I jumped to assuming that second test_grep was in question. x) Yeah that cleanup is redundant. It happens to be placed where I have the Notes cleanup in the other tests.