diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-31 14:05:20 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-31 14:22:13 +0100 |
commit | df9078a9e956ea6be6af328fcdbd2e22331077c1 (patch) | |
tree | 2904da9ab922d900e88b1c1e5be8db3bea8879b4 | |
parent | 99bfdd1686cd2870fce5a4d08d63b479fe4ef41f (diff) |
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 <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | git-debrebase | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 4cc32d2..dd97216 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 13ca472..b61970c 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 [<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); @@ -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; |