From: Junio C Hamano <gitster@pobox.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: "Radovan Haluška" <radovan.haluska1@gmail.com>,
git@vger.kernel.org, "Elijah Newren" <newren@gmail.com>,
"William Sprent" <williams@unity3d.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: Potential bug in `git checkout --quiet`
Date: Tue, 05 Sep 2023 15:36:17 -0700 [thread overview]
Message-ID: <xmqqh6o8qmce.fsf@gitster.g> (raw)
In-Reply-To: <ZPXdeRnLu6oKoVt2@debian.me> (Bagas Sanjaya's message of "Mon, 4 Sep 2023 20:36:57 +0700")
Bagas Sanjaya <bagasdotme@gmail.com> writes:
> On Mon, Sep 04, 2023 at 02:56:37PM +0200, Radovan Haluška wrote:
>> What did you do before the bug happened? (Steps to reproduce your issue)
>>
>> ```
>> git clone --quiet --branch master --depth 1 --no-checkout --filter blob:none \
>> git@github.com:acatai/Strategy-Card-Game-AI-Competition.git locm-agents
>> cd locm-agents
>> git sparse-checkout set --no-cone
>> git sparse-checkout add 'contest-2022-08-COG/ByteRL'
>> git checkout --quiet
>> ```
>>
>> What did you expect to happen? (Expected behavior)
>>
>> I expected to receive no output from any of the commands above.
>>
>> What happened instead? (Actual behavior)
>>
>> I received an output from the last command even though the `--quiet` switch was specified
>>
>> What's different between what you expected and what actually happened?
>>
>> This shouldn't have been printed on the screen:
>>
>> '''
>> remote: Enumerating objects: 28, done.
>> remote: Counting objects: 100% (28/28), done.
>> remote: Compressing objects: 100% (27/27), done.
>> remote: Total 28 (delta 0), reused 25 (delta 0), pack-reused 0
>> Receiving objects: 100% (28/28), 31.40 MiB | 4.94 MiB/s, done.
>> '''
>>
>
> I can reproduce this bug on v2.40.0 using your reproducer above. Yet,
> `git checkout --quiet` on normal repos (not partial ones) works as
> expected. Cc'ing people working on sparse-checkout recently.
I am not much involved in the lazy clone's on-demand downloading,
but I am torn between calling this a bug and a feature.
Just like the original reporter "expected to receive no output", for
a pure Git person like me, I expect to see *no* network activity
while performing a local operation like "checkout". And from that
point of view, "checkout --quiet" telling me that something
unexpected and unusual (i.e. the operation "checkout" that is
supposed to be local is lazily downloading blobs and trees from the
outside world) is happening with the extra output is something I may
even appreciate.
Having said that, I would not fundamentally oppose if those who want
to improve the lazy clone feature wants to squelch messages from the
transport layer while the top-level front end ("checkout" in this case)
wants to operate quietly.
Thanks for a report.
prev parent reply other threads:[~2023-09-05 22:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 12:56 Potential bug in `git checkout --quiet` Radovan Haluška
2023-09-04 13:36 ` Bagas Sanjaya
2023-09-05 22:36 ` Junio C Hamano [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=xmqqh6o8qmce.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=radovan.haluska1@gmail.com \
--cc=williams@unity3d.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).