{"thread":{"id":"27924","subject":"git submodule update --quiet is very loud","startedAt":"2011-07-26T11:26:47Z","lastAt":"2011-07-26T21:39:03Z","messageCount":2,"participants":["Daniel Holtmann-Rice","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"172049","messageId":"3A1F23B2-AC3F-416C-BFBD-97096724C400@gmail.com","threadId":"27924","inReplyTo":null,"subject":"git submodule update --quiet is very loud","fromName":"Daniel Holtmann-Rice","fromEmail":"flyingtabmow@gmail.com","sentAt":"2011-07-26T11:26:47Z","receivedAt":"2011-07-26T11:26:47Z","isPatch":false,"sender":{"key":"flyingtabmow@gmail.com","avatar":null},"body":"Hi,\n\nI can't find a place to submit bug reports, so I'll post this here... the --quiet/-q flag seems to have no effect for 'git submodule update'.  For example (http://pastebin.com/0KWT4EeA):\n\n#!/bin/bash\n\ngit clone -q git://github.com/dhr/evp-tools.git\ncd evp-tools\ngit submodule -q init\ngit submodule -q update\n\nThis doesn't run quietly (the first three commands do, the last does not).  I've tried this through Git 1.7.6.\n\nCheers,\nDan"},{"id":"172097","messageId":"4E2F33F7.20407@web.de","threadId":"27924","inReplyTo":"3A1F23B2-AC3F-416C-BFBD-97096724C400@gmail.com","subject":"[PATCH] submodule: update and add must honor --quiet flag","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2011-07-26T21:39:03Z","receivedAt":"2011-07-26T21:39:03Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"When using the --quiet flag \"git submodule update\" and \"git submodule add\"\ndidn't behave as the documentation stated. They printed progress output\nfrom the clone, even though they should only print error messages.\n\nFix that by passing the -q flag to git clone in module_clone() when the\nGIT_QUIET variable is set. Two tests in t7400 have been modified to test\nthat behavior.\n\nReported-by: Daniel Holtmann-Rice <flyingtabmow@gmail.com>\nSigned-off-by: Jens Lehmann <Jens.Lehmann@web.de>\n---\n\nAm 26.07.2011 13:26, schrieb Daniel Holtmann-Rice:\n> I can't find a place to submit bug reports, so I'll post this here...\n\nThis is the right place.\n\n> the --quiet/-q flag seems to have no effect for 'git submodule update'.  For example (http://pastebin.com/0KWT4EeA):\n> \n> #!/bin/bash\n> \n> git clone -q git://github.com/dhr/evp-tools.git\n> cd evp-tools\n> git submodule -q init\n> git submodule -q update\n> \n> This doesn't run quietly (the first three commands do, the last does not).  I've tried this through Git 1.7.6.\n\nThanks for reporting this, this patch should fix it.\n\n git-submodule.sh           |    9 +++++++--\n t/t7400-submodule-basic.sh |    6 ++++--\n 2 files changed, 11 insertions(+), 4 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex bc1d3fa..f46862f 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -122,12 +122,17 @@ module_clone()\n \tpath=$1\n \turl=$2\n \treference=\"$3\"\n+\tquiet=\n+\tif test -n \"$GIT_QUIET\"\n+\tthen\n+\t\tquiet=-q\n+\tfi\n\n \tif test -n \"$reference\"\n \tthen\n-\t\tgit-clone \"$reference\" -n \"$url\" \"$path\"\n+\t\tgit-clone $quiet \"$reference\" -n \"$url\" \"$path\"\n \telse\n-\t\tgit-clone -n \"$url\" \"$path\"\n+\t\tgit-clone $quiet -n \"$url\" \"$path\"\n \tfi ||\n \tdie \"$(eval_gettext \"Clone of '\\$url' into submodule path '\\$path' failed\")\"\n }\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex 5afe6cc..bc70d69 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -75,7 +75,8 @@ test_expect_success 'submodule add' '\n\n \t(\n \t\tcd addtest &&\n-\t\tgit submodule add \"$submodurl\" submod &&\n+\t\tgit submodule add -q \"$submodurl\" submod >actual &&\n+\t\ttest ! -s actual &&\n \t\tgit submodule init\n \t) &&\n\n@@ -273,7 +274,8 @@ test_expect_success 'update should work when path is an empty dir' '\n \techo \"$rev1\" >expect &&\n\n \tmkdir init &&\n-\tgit submodule update &&\n+\tgit submodule update -q >update.out &&\n+\ttest ! -s update.out &&\n\n \tinspect init &&\n \ttest_cmp expect head-sha1\n-- \n1.7.6.347.g4db0d.dirty\n"}]}