subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1882157 - /subversion/trunk/subversion/libsvn_subr/opt.c
Date Wed, 30 Sep 2020 16:10:26 GMT
Author: stsp
Date: Wed Sep 30 16:10:26 2020
New Revision: 1882157

In --help output, do not suggest the -v option if no global options exist.

While e.g. 'svn --help -v update' prints a section about global options,
other commands such as svnadmin or svnrdump return an error if the -v
option is used, even though their --help messages were suggesting that
more options would be presented with -v.

Reported by: wib_jonas on the #svn IRC channel

* subversion/libsvn_subr/opt.c
  (print_command_info3): Only print a hint about using the -v option if
   the caller has in fact defined a set of global options.


Modified: subversion/trunk/subversion/libsvn_subr/opt.c
--- subversion/trunk/subversion/libsvn_subr/opt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/opt.c Wed Sep 30 16:10:26 2020
@@ -326,7 +326,7 @@ print_command_info3(const svn_opt_subcom
-      if (!verbose)
+      if (!verbose && global_options && *global_options)
         SVN_ERR(svn_cmdline_fputs(_("\n(Use '-v' to show global and experimental options.)\n"),
                                   stream, pool));
       if (have_options)

View raw message