diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-02 21:11:09 -0700 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-07-26 22:52:28 +0100 |
commit | c5fa3c2b04ef704afb6273a8d25f060e4fff96ad (patch) | |
tree | d9cf4fbf31a6e24e1f35ce6481d6e8a54acfd57c /dgit | |
parent | 33a4bc146f390fb3dc2d9521a079c77ed8f1780c (diff) |
dgit: Refactor to create human-readable $subcommand
$cmd,$subcommand now global vars.
No functional change.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -47,6 +47,8 @@ our $absurdity = undef; ###substituted### our @rpushprotovsn_support = qw(4 3 2); # 4 is new tag format our $protovsn; +our $cmd; +our $subcommand; our $isuite; our $idistro; our $package; @@ -6795,7 +6797,7 @@ if (!@ARGV) { print STDERR $helpmsg or die $!; exit 8; } -my $cmd = shift @ARGV; +$cmd = $subcommand = shift @ARGV; $cmd =~ y/-/_/; my $pre_fn = ${*::}{"pre_$cmd"}; |