]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei rediff: handle stdin like other commands
authorKyle Meyer <kyle@kyleam.com>
Sun, 16 May 2021 02:42:42 +0000 (22:42 -0400)
committerEric Wong <e@80x24.org>
Sun, 16 May 2021 15:21:53 +0000 (15:21 +0000)
`lei rediff' reads from stdin when no argument is specified, but this
is likely unintentional given that other lei commands instead have a
--stdin|- option and that `lei rediff --help' includes --stdin.

Align rediff's handling with the other commands'.

lib/PublicInbox/LEI.pm

index 3e17a614962cdaa195625b11b80634e4213d9440..b82fb003687675752c405a5a5192bb3eedd9b82a 100644 (file)
@@ -180,8 +180,9 @@ our %CMD = ( # sorted in order of importance/use:
        qw(git-dir=s@ cwd! verbose|v+ mail! oid-a|A=s path-a|a=s path-b|b=s),
        @lxs_opt, @c_opt ],
 
-'rediff' => [ '[--stdin|LOCATION...]',
+'rediff' => [ '--stdin|LOCATION...',
                'regenerate a diff with different options',
+       'stdin|', # /|\z/ must be first for lone dash
        qw(git-dir=s@ cwd! verbose|v+ color:s no-color),
        @diff_opt, @lxs_opt, @c_opt ],