Re: [PATCH v2 1/1] userdiff: extend Bash pattern to cover more shell function forms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Moumita <dhar61595@xxxxxxxxx> writes:

> From: Moumita Dhar <dhar61595@xxxxxxxxx>
>
> 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 <dhar61595@xxxxxxxxx>

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.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux