You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2020/09/30 16:10:26 UTC

svn commit: r1882157 - /subversion/trunk/subversion/libsvn_subr/opt.c

Author: stsp
Date: Wed Sep 30 16:10:26 2020
New Revision: 1882157

URL: http://svn.apache.org/viewvc?rev=1882157&view=rev
Log:
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
https://colabti.org/irclogger/irclogger_log/svn?date=2020-09-30#l34

* 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

Modified: subversion/trunk/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/opt.c?rev=1882157&r1=1882156&r2=1882157&view=diff
==============================================================================
--- 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)