{"thread":{"id":"40572","subject":"[PATCH] fetch: only show \"Fetching remote\" when verbose mode is enabled","startedAt":"2015-10-16T06:49:32Z","lastAt":"2015-10-16T06:49:32Z","messageCount":1,"participants":["Paul Wise"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"271802","messageId":"1444978172-7317-1-git-send-email-pabs3@bonedaddy.net","threadId":"40572","inReplyTo":null,"subject":"[PATCH] fetch: only show \"Fetching remote\" when verbose mode is enabled","fromName":"Paul Wise","fromEmail":"pabs3@bonedaddy.net","sentAt":"2015-10-16T06:49:32Z","receivedAt":"2015-10-16T06:49:32Z","isPatch":true,"sender":{"key":"pabs3@bonedaddy.net","avatar":"https://avatars.githubusercontent.com/u/328602?v=4"},"body":"By default when fetching one remote nothing is printed unless there\nare changes that need fetching. This makes fetching multiple remotes\nbe just as verbose as fetching a single remote.\n\nThis is needed when fetching multiple repositories using the myrepos\ntool in minimal output mode, where myrepos only prints the repository\nnames when git fetch prints some output. For example in the output below\nthe cgit and git-remote-* lines would be hidden if git fetch were\nsilent by default when fetching multiple remotes, since the default\nfor myrepos is to fetch all remotes for git repositories.\n\npabs@chianamo ~ $ mr -m fetch\nmr fetch: /home/pabs/cgit\nFetching origin\n\nmr fetch: /home/pabs/git\nFetching origin\nFrom https://github.com/git/git\n - [tag update]      junio-gpg-pub -> junio-gpg-pub\nFetching hg\nFrom https://github.com/SRabbelier/git\n - [tag update]      junio-gpg-pub -> junio-gpg-pub\n\nmr fetch: /home/pabs/git-remote-bzr\nFetching origin\n\nmr fetch: /home/pabs/git-remote-hg\nFetching origin\n\nSigned-off-by: Paul Wise <pabs3@bonedaddy.net>\n---\n builtin/fetch.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/fetch.c b/builtin/fetch.c\nindex 9a3869f..fc33667 100644\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -1067,7 +1067,7 @@ static int fetch_multiple(struct string_list *list)\n \tfor (i = 0; i < list->nr; i++) {\n \t\tconst char *name = list->items[i].string;\n \t\targv_array_push(&argv, name);\n-\t\tif (verbosity >= 0)\n+\t\tif (verbosity >= 1)\n \t\t\tprintf(_(\"Fetching %s\\n\"), name);\n \t\tif (run_command_v_opt(argv.argv, RUN_GIT_CMD)) {\n \t\t\terror(_(\"Could not fetch %s\"), name);\n-- \n2.6.1\n"}]}