git-svn: add a double quiet option to hide git commits
People may expect/prefer -q to still show git commits, so this change allows a second -q to hide them. Signed-off-by: Michael Poole <mdpoole@troilus.org> Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Eric Wong <normalperson@yhbt.net>
Simon Arlott committed
Mar 30, 2009 at 19:31 UTC
49750f30767b3eb4683e8d2f4d742354dd5d03d3
2 files changed
+7
-5
Documentation/git-svn.txt
+2
-1
@@ -385,7 +385,8 @@ config key: svn.authorsfile
385
386
-q::
387
--quiet::
388
- Make 'git-svn' less verbose.
388
+ Make 'git-svn' less verbose. Specify a second time to make it
389
+ even less verbose.
390
391
--repack[=<n>]::
392
--repack-flags=<flags>::
git-svn.perl
+5
-4
@@ -68,6 +68,7 @@ my ($_stdin, $_help, $_edit,
68
$_prefix, $_no_checkout, $_url, $_verbose,
69
$_git_format, $_commit_url, $_tag);
70
$Git::SVN::_follow_parent = 1;
71
+$_q ||= 0;
72
my %remote_opts = ( 'username=s' => \$Git::SVN::Prompt::_username,
73
'config-dir=s' => \$Git::SVN::Ra::config_dir,
74
'no-auth-cache' => \$Git::SVN::Prompt::_no_auth_cache,
@@ -80,7 +81,7 @@ my %fc_opts = ( 'follow-parent|follow!' => \$Git::SVN::_follow_parent,
81
'useSvnsyncProps' => \$Git::SVN::_use_svnsync_props,
82
'log-window-size=i' => \$Git::SVN::Ra::_log_window_size,
83
'no-checkout' => \$_no_checkout,
83
- 'quiet|q' => \$_q,
84
+ 'quiet|q+' => \$_q,
85
'repack-flags|repack-args|repack-opts=s' =>
86
\$Git::SVN::_repack_flags,
87
'use-log-author' => \$Git::SVN::_use_log_author,
@@ -2331,13 +2332,13 @@ sub do_git_commit {
2332
2333
$self->{last_rev} = $log_entry->{revision};
2334
$self->{last_commit} = $commit;
2334
- print "r$log_entry->{revision}" unless $::_q;
2335
+ print "r$log_entry->{revision}" unless $::_q > 1;
2336
if (defined $log_entry->{svm_revision}) {
2336
- print " (\@$log_entry->{svm_revision})" unless $::_q;
2337
+ print " (\@$log_entry->{svm_revision})" unless $::_q > 1;
2338
$self->rev_map_set($log_entry->{svm_revision}, $commit,
2339
0, $self->svm_uuid);
2340
}
2340
- print " = $commit ($self->{ref_id})\n" unless $::_q;
2341
+ print " = $commit ($self->{ref_id})\n" unless $::_q > 1;
2342
if (--$_gc_nr == 0) {
2343
$_gc_nr = $_gc_period;
2344
gc();