git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH] clone: use --quiet when stderr is not a terminal
Date: Sun, 15 Mar 2020 08:20:22 -0400	[thread overview]
Message-ID: <a044478f-ca04-3475-90de-0332e80f552d@gmail.com> (raw)
In-Reply-To: <xmqqh7yqc16w.fsf@gitster.c.googlers.com>



On 3/14/2020 1:10 PM, Junio C Hamano wrote:
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> From: Derrick Stolee <dstolee@microsoft.com>
>>
>> "git clone" is used by many build systems to download Git code before
>> running a build. The output of these systems is usually color-coded to
>> separate stdout and stderr output, which highlights anything over stderr
>> as an error or warning. Most build systems use "--quiet" when cloning to
>> avoid adding progress noise to these outputs, but occasionally users
>> create their own scripts that call "git clone" and forget the --quiet
>> option.
>>
>> Just such a user voiced a complaint that "git clone" was showing "error
>> messages" in bright red. The messages were progress indicators for
>> "Updating files".
>>
>> To save users from this confusion, let's default to --quiet when stderr
>> is not a terminal window.
> 
> This is the kind of behaviour change that makes me (and probably
> others who have been with the project long enough) to say "it is
> certain that some other users and tools are relying on the current
> behaviour and their expectation, when explained, would look just as
> sensible, if not more, than 'any output to the standard error stream
> is an error', which is the justfication given for this change."
>
> I would not be surprised if a GUI program is counting the bytes
> coming to the progress output to show the equivalent with bits on
> the screen, for example.  They would say "Git has always given
> progress output to the standard error stream.  We, as any other
> sensible folks, know that they are not errors and won't give a
> misleading and alarming messages in red.  We could change our
> program to pass --progress but why should we be the one who are
> forced to do such a change", and I do not have *any* excuse I find
> sensible enough to give them.

You are absolutely right. Tools should do the right thing, and users
creating their own scripts should understand the output of the
commands they are calling.

And I was coming back to this thread shortly after waking up since
I realized why the test fallout was bigger than I anticipated: this
change shouldn't enable "--quiet" but instead "--no-progress". The
loss of messages like "Cloning from ..." is actually a problematic
behavior change.

I'll send a v2 using "--no-progress" instead.

> I do not mind queuing this (or any similar backward compatibility
> breaking changes) and merging it down to 'next', but if we were plan
> to have it in a tagged release, I'd prefer to keep it in 'next' for
> at least a few releases before doing so, and under three conditions:
> major organizations and those who build tools around Git promise me
> that they adopt 'next' for their developers and users early, and
> that they actively measure and report potential damages before it is
> advanced to 'master', and that they won't let their users complain
> after it hits a tagged release.

I understand that this is low-priority. This idea of adapting "next"
early is interesting to me. It is likely difficult to deploy that
branch to CI/CD systems, but I have been thinking of ways to
automate our integration process in microsoft/git (and Scalar and
VFS for Git) so we find the behavior changes and pain points a lot
sooner. I'll see what I can do on this front in the coming weeks.

> If the world and userbase were like today back when "clone" learned
> the --quiet option and showing the progress meter 15 years ago, I
> suspect that we may have chosen this way from the beginning, though.

I appreciate your perspective here. I will not be upset if this
change is rejected due to backward compatibility concerns. It's
tricky to update the user experience around these well-established
features like "clone".

Thanks,
-Stolee

  reply	other threads:[~2020-03-15 12:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 21:09 [PATCH] clone: use --quiet when stderr is not a terminal Derrick Stolee via GitGitGadget
2020-03-14 17:10 ` Junio C Hamano
2020-03-15 12:20   ` Derrick Stolee [this message]
2020-03-15 13:41     ` [RFC] Universal progress option (was Re: [PATCH] clone: use --quiet when stderr is not a terminal) Derrick Stolee
2020-03-15 19:39       ` Junio C Hamano
2020-03-15 23:59         ` Junio C Hamano
2020-03-16  0:27           ` Derrick Stolee
2020-03-14 19:16 ` [PATCH] clone: use --quiet when stderr is not a terminal Elijah Newren

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a044478f-ca04-3475-90de-0332e80f552d@gmail.com \
    --to=stolee@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).