{"thread":{"id":"21018","subject":"[PATCH] git-submodule should obey --quiet for subcommands","startedAt":"2009-09-21T16:46:33Z","lastAt":"2009-09-24T09:15:51Z","messageCount":5,"participants":["Jonathan del Strother","Nanako Shiraishi"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"123589","messageId":"57518fd10909210946p425d275fy76362a4b2ccc0e05@mail.gmail.com","threadId":"21018","inReplyTo":null,"subject":"[PATCH] git-submodule should obey --quiet for subcommands","fromName":"Jonathan del Strother","fromEmail":"maillist@steelskies.com","sentAt":"2009-09-21T16:46:33Z","receivedAt":"2009-09-21T16:46:33Z","isPatch":true,"sender":{"key":"jon.delstrother@bestbefore.tv","avatar":"https://gravatar.com/avatar/754e21ab701c00e2d21fc261187254c34b2a1c0b959d9ee5be1a295990be3081?d=mp&s=160"},"body":"Make sure that --quiet is passed through to git-clone & git-fetch.\n\nSigned-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>\n---\nclone & fetch are extremely noisy - perhaps something like the following?\n\n git-submodule.sh |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex bfbd36b..1e1066e 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -106,9 +106,9 @@ module_clone()\n\n \tif test -n \"$reference\"\n \tthen\n-\t\tgit-clone \"$reference\" -n \"$url\" \"$path\"\n+\t\tgit-clone ${GIT_QUIET:+-q} \"$reference\" -n \"$url\" \"$path\"\n \telse\n-\t\tgit-clone -n \"$url\" \"$path\"\n+\t\tgit-clone ${GIT_QUIET:+-q} -n \"$url\" \"$path\"\n \tfi ||\n \tdie \"Clone of '$url' into submodule path '$path' failed\"\n }\n@@ -450,7 +450,7 @@ cmd_update()\n \t\t\tif test -z \"$nofetch\"\n \t\t\tthen\n \t\t\t\t(unset GIT_DIR; cd \"$path\" &&\n-\t\t\t\t\tgit-fetch) ||\n+\t\t\t\t\tgit-fetch ${GIT_QUIET:+-q}) ||\n \t\t\t\tdie \"Unable to fetch in submodule path '$path'\"\n \t\t\tfi\n\n-- \n1.6.5.rc1.44.ga1675.dirty\n"},{"id":"123700","messageId":"57518fd10909231433i773aff78kae6b763d0a533279@mail.gmail.com","threadId":"21018","inReplyTo":"57518fd10909210946p425d275fy76362a4b2ccc0e05@mail.gmail.com","subject":"Re: [PATCH] git-submodule should obey --quiet for subcommands","fromName":"Jonathan del Strother","fromEmail":"maillist@steelskies.com","sentAt":"2009-09-23T21:33:30Z","receivedAt":"2009-09-23T21:33:30Z","isPatch":true,"sender":{"key":"jon.delstrother@bestbefore.tv","avatar":"https://gravatar.com/avatar/754e21ab701c00e2d21fc261187254c34b2a1c0b959d9ee5be1a295990be3081?d=mp&s=160"},"body":"On Mon, Sep 21, 2009 at 5:46 PM, Jonathan del Strother\n<maillist@steelskies.com> wrote:\n> Make sure that --quiet is passed through to git-clone & git-fetch.\n>\n> Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>\n> ---\n> clone & fetch are extremely noisy - perhaps something like the following?\n>\n>  git-submodule.sh |    6 +++---\n>  1 files changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/git-submodule.sh b/git-submodule.sh\n> index bfbd36b..1e1066e 100755\n> --- a/git-submodule.sh\n> +++ b/git-submodule.sh\n> @@ -106,9 +106,9 @@ module_clone()\n>\n>        if test -n \"$reference\"\n>        then\n> -               git-clone \"$reference\" -n \"$url\" \"$path\"\n> +               git-clone ${GIT_QUIET:+-q} \"$reference\" -n \"$url\" \"$path\"\n>        else\n> -               git-clone -n \"$url\" \"$path\"\n> +               git-clone ${GIT_QUIET:+-q} -n \"$url\" \"$path\"\n>        fi ||\n>        die \"Clone of '$url' into submodule path '$path' failed\"\n>  }\n> @@ -450,7 +450,7 @@ cmd_update()\n>                        if test -z \"$nofetch\"\n>                        then\n>                                (unset GIT_DIR; cd \"$path\" &&\n> -                                       git-fetch) ||\n> +                                       git-fetch ${GIT_QUIET:+-q}) ||\n>                                die \"Unable to fetch in submodule path '$path'\"\n>                        fi\n>\n> --\n> 1.6.5.rc1.44.ga1675.dirty\n>\n\n\nNo takers?  Perhaps I should explain my interest in this patch : we\nuse Capistrano to deploy our Rails app which contains a bunch of\nsubmodules.  It's done over ssh, so the 'git submodule update' step\nduring deployment spews something along the lines of :\n\nReceiving objects: 0% (0/401), 1.55 MiB | 424 KiB/s\nReceiving objects: 1% (4/401), 2.15 MiB | 612 KiB/s\nReceiving objects: 2% (8/401), 2.90 MiB | 510 KiB/s\n....\n..\n.\n\nall the way up to 100% to the console.  Currently we're just directing\nstdout to /dev/null, since --quiet failed to accomplish much, but it\nseems like something along the lines of this patch would be useful.\n\nUnless someone has a better implementation...?\n"},{"id":"123708","messageId":"20090924143130.6117@nanako3.lavabit.com","threadId":"21018","inReplyTo":"57518fd10909231433i773aff78kae6b763d0a533279@mail.gmail.com","subject":"Re: [PATCH] git-submodule should obey --quiet for subcommands","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-09-24T05:31:30Z","receivedAt":"2009-09-24T05:31:30Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Jonathan del Strother <maillist@steelskies.com>\n\n> No takers?  Perhaps I should explain my interest in this patch : we\n> use Capistrano to deploy our Rails app which contains a bunch of\n> submodules.  It's done over ssh, so the 'git submodule update' step\n> during deployment spews something along the lines of :\n>\n> Receiving objects: 0% (0/401), 1.55 MiB | 424 KiB/s\n> Receiving objects: 1% (4/401), 2.15 MiB | 612 KiB/s\n> Receiving objects: 2% (8/401), 2.90 MiB | 510 KiB/s\n> ....\n> ..\n\nDoes 'git clone' itself do that to you, too, or do you see these output on separate lines only when running 'git submodule clone'? I never used 'git submodule clone' but with 'git clone' these lines seem to overwrite one after another and they never bothered me. Could your terminal emulator be broken?\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"123720","messageId":"57518fd10909240034p668f858bh17fc20715b4838c3@mail.gmail.com","threadId":"21018","inReplyTo":"20090924143130.6117@nanako3.lavabit.com","subject":"Re: [PATCH] git-submodule should obey --quiet for subcommands","fromName":"Jonathan del Strother","fromEmail":"maillist@steelskies.com","sentAt":"2009-09-24T07:34:13Z","receivedAt":"2009-09-24T07:34:13Z","isPatch":true,"sender":{"key":"jon.delstrother@bestbefore.tv","avatar":"https://gravatar.com/avatar/754e21ab701c00e2d21fc261187254c34b2a1c0b959d9ee5be1a295990be3081?d=mp&s=160"},"body":"On Thu, Sep 24, 2009 at 6:31 AM, Nanako Shiraishi <nanako3@lavabit.com> wrote:\n> Quoting Jonathan del Strother <maillist@steelskies.com>\n>\n>> No takers?  Perhaps I should explain my interest in this patch : we\n>> use Capistrano to deploy our Rails app which contains a bunch of\n>> submodules.  It's done over ssh, so the 'git submodule update' step\n>> during deployment spews something along the lines of :\n>>\n>> Receiving objects: 0% (0/401), 1.55 MiB | 424 KiB/s\n>> Receiving objects: 1% (4/401), 2.15 MiB | 612 KiB/s\n>> Receiving objects: 2% (8/401), 2.90 MiB | 510 KiB/s\n>> ....\n>> ..\n>\n> Does 'git clone' itself do that to you, too, or do you see these output on separate lines only when running 'git submodule clone'? I never used 'git submodule clone' but with 'git clone' these lines seem to overwrite one after another and they never bothered me. Could your terminal emulator be broken?\n>\n\nNo, git clone has the same problem when run under Capistrano, but it\nobeys --quiet.\n\nThat said, I always assumed that, say, 'ssh -t myhost git clone foo'\nwould have the same problem (ie printing each progress update on a new\nline), but I see it works correctly.  Looks like Capistrano is eating\nthe \\r somewhere.  I still think my patch is valid, but I'll\ninvestigate into Capistrano some more & see if I can fix it there.\n\nJonathan\n"},{"id":"123725","messageId":"57518fd10909240215n30e6336eo2fc344d810c8b38c@mail.gmail.com","threadId":"21018","inReplyTo":"57518fd10909240034p668f858bh17fc20715b4838c3@mail.gmail.com","subject":"Re: [PATCH] git-submodule should obey --quiet for subcommands","fromName":"Jonathan del Strother","fromEmail":"maillist@steelskies.com","sentAt":"2009-09-24T09:15:51Z","receivedAt":"2009-09-24T09:15:51Z","isPatch":true,"sender":{"key":"jon.delstrother@bestbefore.tv","avatar":"https://gravatar.com/avatar/754e21ab701c00e2d21fc261187254c34b2a1c0b959d9ee5be1a295990be3081?d=mp&s=160"},"body":"On Thu, Sep 24, 2009 at 8:34 AM, Jonathan del Strother\n<maillist@steelskies.com> wrote:\n> On Thu, Sep 24, 2009 at 6:31 AM, Nanako Shiraishi <nanako3@lavabit.com> wrote:\n>> Quoting Jonathan del Strother <maillist@steelskies.com>\n>>\n>>> No takers?  Perhaps I should explain my interest in this patch : we\n>>> use Capistrano to deploy our Rails app which contains a bunch of\n>>> submodules.  It's done over ssh, so the 'git submodule update' step\n>>> during deployment spews something along the lines of :\n>>>\n>>> Receiving objects: 0% (0/401), 1.55 MiB | 424 KiB/s\n>>> Receiving objects: 1% (4/401), 2.15 MiB | 612 KiB/s\n>>> Receiving objects: 2% (8/401), 2.90 MiB | 510 KiB/s\n>>> ....\n>>> ..\n>>\n>> Does 'git clone' itself do that to you, too, or do you see these output on separate lines only when running 'git submodule clone'? I never used 'git submodule clone' but with 'git clone' these lines seem to overwrite one after another and they never bothered me. Could your terminal emulator be broken?\n>>\n>\n> No, git clone has the same problem when run under Capistrano, but it\n> obeys --quiet.\n>\n> That said, I always assumed that, say, 'ssh -t myhost git clone foo'\n> would have the same problem (ie printing each progress update on a new\n> line), but I see it works correctly.  Looks like Capistrano is eating\n> the \\r somewhere.  I still think my patch is valid, but I'll\n> investigate into Capistrano some more & see if I can fix it there.\n>\n> Jonathan\n>\n\n... thinking about it, it's obvious why Capistrano doesn't handle the\n\\r properly - it's running commands in parallel on multiple machines,\nand echoing any output from the commands (prefixed with the machine\nname) back to the user in realtime.  So it would be kinda tricky for\n\\r to work as expected there.\n"}]}