From: Junio C Hamano Date: Tue, 18 Feb 2025 23:38:12 GMT Subject: Re: [PATCH v2 1/1] userdiff: extend Bash pattern to cover more shell function forms Message-ID: In-Reply-To: <20250218153537.16320-2-dhar61595@gmail.com> Moumita writes: > From: Moumita Dhar > > The existing Bash userdiff pattern misses some shell function forms, such as > `function foo()`, multi-line definitions, and extra whitespace. > > Extend the pattern to: > - Support `function foo()` syntax. > - Allow spaces in `foo ( )` definitions. > - Recognize multi-line definitions with backslashes. > - Broaden function body detection. > > Signed-off-by: Moumita Dhar Applied to any one of the recent tips of 'master', this seemed break tests and the reproduction seems to be quite easy. $ make $ cd t && sh t4018-*.sh -i -v ... test_expect_code: command exited with 128, we wanted 1 ... not ok 6 - builtin bash pattern compiles #... # test_grep ! fatal msg && # test_grep ! error msg # $ cat t/trash*.t4018*/msg fatal: Invalid regexp to look for hunk header: ^[ ]*(([a-z... Please make it a habit to run tests after you modified the code before sending out patches with the modifications. Thanks.