{"thread":{"id":"60194","subject":"Potential bug in `git checkout --quiet`","startedAt":"2023-09-04T12:56:54Z","lastAt":"2023-09-05T22:36:30Z","messageCount":3,"participants":["Radovan Haluška","Bagas Sanjaya","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"481367","messageId":"9419E14B-5933-4773-B1BA-899A7DA75D96@gmail.com","threadId":"60194","inReplyTo":null,"subject":"Potential bug in `git checkout --quiet`","fromName":"Radovan Haluška","fromEmail":"radovan.haluska1@gmail.com","sentAt":"2023-09-04T12:56:37Z","receivedAt":"2023-09-04T12:56:54Z","isPatch":false,"sender":{"key":"radovan.haluska1@gmail.com","avatar":null},"body":"Hello,\n\nI believe I have found a bug in the `git checkout —quiet` command. Below, you can find the output of `git bugreport`. Thank you\n\nBest,\nRadovan Haluska\n\n——\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\n```\ngit clone --quiet --branch master --depth 1 --no-checkout --filter blob:none \\\n    git@github.com:acatai/Strategy-Card-Game-AI-Competition.git locm-agents\ncd locm-agents\ngit sparse-checkout set --no-cone\ngit sparse-checkout add 'contest-2022-08-COG/ByteRL'\ngit checkout --quiet\n```\n\nWhat did you expect to happen? (Expected behavior)\n\nI expected to receive no output from any of the commands above.\n\nWhat happened instead? (Actual behavior)\n\nI received an output from the last command even though the `--quiet` switch was specified\n\nWhat's different between what you expected and what actually happened?\n\nThis shouldn't have been printed on the screen:\n\n'''\nremote: Enumerating objects: 28, done.\nremote: Counting objects: 100% (28/28), done.\nremote: Compressing objects: 100% (27/27), done.\nremote: Total 28 (delta 0), reused 25 (delta 0), pack-reused 0\nReceiving objects: 100% (28/28), 31.40 MiB | 4.94 MiB/s, done.\n'''\n\nAnything else you want to add:\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.42.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: 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\ncompiler info: clang: 14.0.3 (clang-1403.0.22.14.1)\nlibc info: no libc information available\n$SHELL (typically, interactive shell): /bin/zsh\n\n\n[Enabled Hooks]\nnot run from a git repository - no hooks to show\n\n"},{"id":"481368","messageId":"ZPXdeRnLu6oKoVt2@debian.me","threadId":"60194","inReplyTo":"9419E14B-5933-4773-B1BA-899A7DA75D96@gmail.com","subject":"Re: Potential bug in `git checkout --quiet`","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2023-09-04T13:36:57Z","receivedAt":"2023-09-04T13:37:18Z","isPatch":false,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"On Mon, Sep 04, 2023 at 02:56:37PM +0200, Radovan Haluška wrote:\n> What did you do before the bug happened? (Steps to reproduce your issue)\n> \n> ```\n> git clone --quiet --branch master --depth 1 --no-checkout --filter blob:none \\\n>     git@github.com:acatai/Strategy-Card-Game-AI-Competition.git locm-agents\n> cd locm-agents\n> git sparse-checkout set --no-cone\n> git sparse-checkout add 'contest-2022-08-COG/ByteRL'\n> git checkout --quiet\n> ```\n> \n> What did you expect to happen? (Expected behavior)\n> \n> I expected to receive no output from any of the commands above.\n> \n> What happened instead? (Actual behavior)\n> \n> I received an output from the last command even though the `--quiet` switch was specified\n> \n> What's different between what you expected and what actually happened?\n> \n> This shouldn't have been printed on the screen:\n> \n> '''\n> remote: Enumerating objects: 28, done.\n> remote: Counting objects: 100% (28/28), done.\n> remote: Compressing objects: 100% (27/27), done.\n> remote: Total 28 (delta 0), reused 25 (delta 0), pack-reused 0\n> Receiving objects: 100% (28/28), 31.40 MiB | 4.94 MiB/s, done.\n> '''\n> \n\nI can reproduce this bug on v2.40.0 using your reproducer above. Yet,\n`git checkout --quiet` on normal repos (not partial ones) works as\nexpected. Cc'ing people working on sparse-checkout recently.\n\nThanks.\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"481418","messageId":"xmqqh6o8qmce.fsf@gitster.g","threadId":"60194","inReplyTo":"ZPXdeRnLu6oKoVt2@debian.me","subject":"Re: Potential bug in `git checkout --quiet`","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-09-05T22:36:17Z","receivedAt":"2023-09-05T22:36:30Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Bagas Sanjaya <bagasdotme@gmail.com> writes:\n\n> On Mon, Sep 04, 2023 at 02:56:37PM +0200, Radovan Haluška wrote:\n>> What did you do before the bug happened? (Steps to reproduce your issue)\n>> \n>> ```\n>> git clone --quiet --branch master --depth 1 --no-checkout --filter blob:none \\\n>>     git@github.com:acatai/Strategy-Card-Game-AI-Competition.git locm-agents\n>> cd locm-agents\n>> git sparse-checkout set --no-cone\n>> git sparse-checkout add 'contest-2022-08-COG/ByteRL'\n>> git checkout --quiet\n>> ```\n>> \n>> What did you expect to happen? (Expected behavior)\n>> \n>> I expected to receive no output from any of the commands above.\n>> \n>> What happened instead? (Actual behavior)\n>> \n>> I received an output from the last command even though the `--quiet` switch was specified\n>> \n>> What's different between what you expected and what actually happened?\n>> \n>> This shouldn't have been printed on the screen:\n>> \n>> '''\n>> remote: Enumerating objects: 28, done.\n>> remote: Counting objects: 100% (28/28), done.\n>> remote: Compressing objects: 100% (27/27), done.\n>> remote: Total 28 (delta 0), reused 25 (delta 0), pack-reused 0\n>> Receiving objects: 100% (28/28), 31.40 MiB | 4.94 MiB/s, done.\n>> '''\n>> \n>\n> I can reproduce this bug on v2.40.0 using your reproducer above. Yet,\n> `git checkout --quiet` on normal repos (not partial ones) works as\n> expected. Cc'ing people working on sparse-checkout recently.\n\nI am not much involved in the lazy clone's on-demand downloading,\nbut I am torn between calling this a bug and a feature.\n\nJust like the original reporter \"expected to receive no output\", for\na pure Git person like me, I expect to see *no* network activity\nwhile performing a local operation like \"checkout\".  And from that\npoint of view, \"checkout --quiet\" telling me that something\nunexpected and unusual (i.e. the operation \"checkout\" that is\nsupposed to be local is lazily downloading blobs and trees from the\noutside world) is happening with the extra output is something I may\neven appreciate.\n\nHaving said that, I would not fundamentally oppose if those who want\nto improve the lazy clone feature wants to squelch messages from the\ntransport layer while the top-level front end (\"checkout\" in this case)\nwants to operate quietly.\n\nThanks for a report.\n"}]}