All of lore.kernel.org
 help / color / mirror / Atom feed
* Potential bug in `git checkout --quiet`
@ 2023-09-04 12:56 Radovan Haluška
  2023-09-04 13:36 ` Bagas Sanjaya
  0 siblings, 1 reply; 3+ messages in thread
From: Radovan Haluška @ 2023-09-04 12:56 UTC (permalink / raw)
  To: git

Hello,

I believe I have found a bug in the `git checkout —quiet` command. Below, you can find the output of `git bugreport`. Thank you

Best,
Radovan Haluska

——

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

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.
'''

Anything else you want to add:

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.42.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Darwin 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:51:50 PDT 2023; root:xnu-8796.121.2~5/RELEASE_X86_64 x86_64
compiler info: clang: 14.0.3 (clang-1403.0.22.14.1)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/zsh


[Enabled Hooks]
not run from a git repository - no hooks to show


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Potential bug in `git checkout --quiet`
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Bagas Sanjaya @ 2023-09-04 13:36 UTC (permalink / raw)
  To: Radovan Haluška, git
  Cc: Elijah Newren, William Sprent,
	Ævar Arnfjörð Bjarmason, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

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.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Potential bug in `git checkout --quiet`
  2023-09-04 13:36 ` Bagas Sanjaya
@ 2023-09-05 22:36   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2023-09-05 22:36 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: Radovan Haluška, git, Elijah Newren, William Sprent,
	Ævar Arnfjörð Bjarmason

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-05 22:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.