Provide a usage message.
I'm not convinced an option summary here is a good idea, mainly there
aren't any really important options. (-f will be advertised when it
is relevant.) So I have just summarised the most important operations.
Closes:#904990.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase(1): Warn against plain git rebase. (Re#905004.)
* dgit-maint-debrebase(7): Warn more against plain git rebase.
Closes:#905004.
* git-debrebase(1): Warn against plain git rebase. (Re#905004.)
* dgit-maint-debrebase(7): Warn more against plain git rebase.
Closes:#905004.
+ * git-debrebase: Implement --help, providing a summary.
+ Closes:#904990.
use File::FnMatch qw(:fnmatch);
use File::Copy;
use File::FnMatch qw(:fnmatch);
use File::Copy;
+our ($usage_message) = <<'END';
+usages:
+ git-debrebase [<options>] [--|-i <git rebase options...>]
+ git-debrebase [<options>] status
+ git-debrebase [<options>] prepush [--prose=...]
+ git-debrebase [<options>] quick|conclude
+ git-debrebase [<options>] new-upstream <new-version> [<details ...>]
+ git-debrebase [<options>] convert-from-gbp [<upstream-commitish>]
+ ...
+See git-debrebase(1), git-debrebase(5), dgit-maint-debrebase(7) (in dgit).
+END
+
our ($opt_force, $opt_noop_ok, @opt_anchors);
our ($opt_defaultcmd_interactive);
our ($opt_force, $opt_noop_ok, @opt_anchors);
our ($opt_defaultcmd_interactive);
# approach. '-i=s{0,}' does not work with bundling.
push @$opt_defaultcmd_interactive, @ARGV;
@ARGV=();
# approach. '-i=s{0,}' does not work with bundling.
push @$opt_defaultcmd_interactive, @ARGV;
@ARGV=();
+ },
+ 'help' => sub { print $usage_message or die $!; finish 0; },
+ );
initdebug('git-debrebase ');
enabledebug if $debuglevel;
initdebug('git-debrebase ');
enabledebug if $debuglevel;