From: Ian Jackson Date: Tue, 31 Jul 2018 13:05:20 +0000 (+0100) Subject: git-debrebase: Implement --help, providing a summary. X-Git-Tag: archive/debian/6.3~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=df9078a9e956ea6be6af328fcdbd2e22331077c1 git-debrebase: Implement --help, providing a summary. 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 --- diff --git a/debian/changelog b/debian/changelog index 4cc32d27..dd972163 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ dgit (6.3~) unstable; urgency=medium * 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. -- diff --git a/git-debrebase b/git-debrebase index 13ca472d..b61970ce 100755 --- a/git-debrebase +++ b/git-debrebase @@ -36,6 +36,18 @@ use Dpkg::Version; use File::FnMatch qw(:fnmatch); use File::Copy; +our ($usage_message) = <<'END'; +usages: + git-debrebase [] [--|-i ] + git-debrebase [] status + git-debrebase [] prepush [--prose=...] + git-debrebase [] quick|conclude + git-debrebase [] new-upstream [
] + git-debrebase [] convert-from-gbp [] + ... +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); @@ -1826,7 +1838,9 @@ getoptions("bad options\n", # 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;