From: "Jan Stępień" <jan@stepien.cc>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] fetch-pack: make the ssh connection quiet
Date: Thu, 28 Oct 2010 11:14:03 +0200 [thread overview]
Message-ID: <20101028111403.db0f8593.jan@stepien.cc> (raw)
In-Reply-To: <7v1v7bclhe.fsf@alter.siamese.dyndns.org>
On Wed, 27 Oct 2010 15:35:41 -0700
Junio C Hamano <gitster@pobox.com> wrote:
> Jan Stępień <jstepien@users.sourceforge.net> writes:
> > The --quiet option passed to fetch-pack did not affect the ssh child
> > process. When an ssh server sent a motd it was displayed because the ssh
> > client wasn't launched with the -q option.
>
> This is curious for a couple of reasons:
>
> 1. "-q" option to "ssh" is not meant to supress "motd"; it is about
> warning and diagnostics. From man ssh(1):
>
> -q Quiet mode. Causes most warning and diagnostic messages to be
> suppressed. Only fatal errors are displayed. If a second -q is
> given then even fatal errors are suppressed, except for those
> produced due solely to bad argu‐ ments.
>
> 2. "PrintMotd" defaults to "yes" but it is to specify whether the daemon
> should print /etc/motd when a user logs in interactively. I didn't
> think fetch-pack logged in interactively, so why should this matter?
>
You're right, fetch-pack doesn't log in interactively so the actual motd
is not displayed. I made some research and it turned out that what I
described in the commit message as the "motd" was in fact the Banner.
Quoting man sshd_config(5):
Banner The contents of the specified file are sent to the remote
user before authentication is allowed. If the argument is
“none” then no banner is displayed. This option is only
available for protocol version 2. By default, no banner
is displayed.
From what I've read it seems that the Banner is generally used to
display some legal information, such as "this system can be used by
authorised personnel only, others will be prosecuted".
I'd say that suppressing such information along with diagnostic
messages might be expected after adding the "-q" flag to fetch-pack
and other similar commands. Fatal errors will be printed anyway. The
question is whether "--quiet" should suppress warnings as well. From my
point of view it is reasonable or at least acceptable. An alternative
solution might be to add another level of verbosity, namely "--silent".
Thanks,
--
Jan Stępień <jan@stepien.cc>
prev parent reply other threads:[~2010-10-28 9:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 14:27 [PATCH] fetch-pack: make the ssh connection quiet Jan Stępień
2010-10-27 15:24 ` Drew Northup
2010-10-27 18:40 ` Jan Stępień
2010-10-27 22:35 ` Junio C Hamano
2010-10-28 9:14 ` Jan Stępień [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101028111403.db0f8593.jan@stepien.cc \
--to=jan@stepien.cc \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).