{"thread":{"id":"23486","subject":"[PATCH] Support \"git remote --quiet update\"","startedAt":"2010-04-15T22:11:16Z","lastAt":"2010-04-16T02:59:31Z","messageCount":3,"participants":["Zefram","Tay Ray Chuan"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"139632","messageId":"E1O2XT7-00011E-RT@lake.fysh.org","threadId":"23486","inReplyTo":null,"subject":"[PATCH] Support \"git remote --quiet update\"","fromName":"Zefram","fromEmail":"zefram@fysh.org","sentAt":"2010-04-15T22:11:16Z","receivedAt":"2010-04-15T22:11:16Z","isPatch":true,"sender":{"key":"zefram@fysh.org","avatar":null},"body":"Add --quiet option for git-remote, which it will pass on to git-fetch.\n---\n Documentation/git-remote.txt |    9 ++++++++-\n builtin/remote.c             |   16 ++++++++--------\n 2 files changed, 16 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt\nindex 3fc599c..25f6c05 100644\n--- a/Documentation/git-remote.txt\n+++ b/Documentation/git-remote.txt\n@@ -19,7 +19,8 @@ SYNOPSIS\n 'git remote set-url --delete' [--push] <name> <url>\n 'git remote' [-v | --verbose] 'show' [-n] <name>\n 'git remote prune' [-n | --dry-run] <name>\n-'git remote' [-v | --verbose] 'update' [-p | --prune] [group | remote]...\n+'git remote' [-v | --verbose] [-q | --quiet] 'update'\n+\t     [-p | --prune] [group | remote]...\n \n DESCRIPTION\n -----------\n@@ -30,6 +31,12 @@ Manage the set of repositories (\"remotes\") whose branches you track.\n OPTIONS\n -------\n \n+-q::\n+--quiet::\n+\tPass --quiet to git-fetch.  Progress is not reported to the\n+\tstandard error stream.\n+\tNOTE: This must be placed between `remote` and `subcommand`.\n+\n -v::\n --verbose::\n \tBe a little more verbose and show remote url after name.\ndiff --git a/builtin/remote.c b/builtin/remote.c\nindex 277765b..5447780 100644\n--- a/builtin/remote.c\n+++ b/builtin/remote.c\n@@ -15,7 +15,7 @@ static const char * const builtin_remote_usage[] = {\n \t\"git remote set-head <name> (-a | -d | <branch>)\",\n \t\"git remote [-v | --verbose] show [-n] <name>\",\n \t\"git remote prune [-n | --dry-run] <name>\",\n-\t\"git remote [-v | --verbose] update [-p | --prune] [group | remote]\",\n+\t\"git remote [-v | --verbose] [-q | --quiet] update [-p | --prune] [group | remote]\",\n \t\"git remote set-url <name> <newurl> [<oldurl>]\",\n \t\"git remote set-url --add <name> <newurl>\",\n \t\"git remote set-url --delete <name> <url>\",\n@@ -68,7 +68,7 @@ static const char * const builtin_remote_seturl_usage[] = {\n #define GET_HEAD_NAMES (1<<1)\n #define GET_PUSH_REF_STATES (1<<2)\n \n-static int verbose;\n+static int verbosity;\n \n static int show_all(void);\n static int prune_remote(const char *remote, int dry_run);\n@@ -94,8 +94,8 @@ static int opt_parse_track(const struct option *opt, const char *arg, int not)\n static int fetch_remote(const char *name)\n {\n \tconst char *argv[] = { \"fetch\", name, NULL, NULL };\n-\tif (verbose) {\n-\t\targv[1] = \"-v\";\n+\tif (verbosity != 0) {\n+\t\targv[1] = verbosity > 0 ? \"-v\" : \"-q\";\n \t\targv[2] = name;\n \t}\n \tprintf(\"Updating %s\\n\", name);\n@@ -1246,8 +1246,8 @@ static int update(int argc, const char **argv)\n \n \tif (prune)\n \t\tfetch_argv[fetch_argc++] = \"--prune\";\n-\tif (verbose)\n-\t\tfetch_argv[fetch_argc++] = \"-v\";\n+\tif (verbosity != 0)\n+\t\tfetch_argv[fetch_argc++] = verbosity > 0 ? \"-v\" : \"-q\";\n \tfetch_argv[fetch_argc++] = \"--multiple\";\n \tif (argc < 2)\n \t\tfetch_argv[fetch_argc++] = \"default\";\n@@ -1395,7 +1395,7 @@ static int show_all(void)\n \t\tsort_string_list(&list);\n \t\tfor (i = 0; i < list.nr; i++) {\n \t\t\tstruct string_list_item *item = list.items + i;\n-\t\t\tif (verbose)\n+\t\t\tif (verbosity > 0)\n \t\t\t\tprintf(\"%s\\t%s\\n\", item->string,\n \t\t\t\t\titem->util ? (const char *)item->util : \"\");\n \t\t\telse {\n@@ -1412,7 +1412,7 @@ static int show_all(void)\n int cmd_remote(int argc, const char **argv, const char *prefix)\n {\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('v', \"verbose\", &verbose, \"be verbose; must be placed before a subcommand\"),\n+\t\tOPT__VERBOSITY(&verbosity),\n \t\tOPT_END()\n \t};\n \tint result;\n-- \n1.7.1.rc1.12.ga601.dirty\n"},{"id":"139655","messageId":"E1O2fKp-0004d9-Na@lake.fysh.org","threadId":"23486","inReplyTo":"o2xbe6fef0d1004151959h6dd0405bhc669fe6284a66044@mail.gmail.com","subject":"[PATCH] Support \"git remote --quiet update\"","fromName":"Zefram","fromEmail":"zefram@fysh.org","sentAt":"2010-04-15T22:11:16Z","receivedAt":"2010-04-15T22:11:16Z","isPatch":true,"sender":{"key":"zefram@fysh.org","avatar":null},"body":"Add --quiet option for git-remote, which it will pass on to git-fetch.\n\nSigned-off-by: Zefram <zefram@fysh.org>\n---\n\nTay Ray Chuan <rctay89@gmail.com> wrote:\n>Signed-off-by?\n>\n>  http://github.com/git/git/blob/master/Documentation/SubmittingPatches\n\nBah, sorry, I hadn't noticed that document.  That's what I get for\njumping in quickly.\n\nSince I'm writing an epigram now, I might as well throw in some context.\nI'm a new git user, only been using it seriously for the past few days,\nso I've been inhaling a lot of documentation.  I found just a handful of\nsmall annoyances.  Upon checking out git.git, it turned out that most\nof them had already been fixed, such as \"git fetch --quiet\" not really\nbeing quiet.  (I was using git 1.5.6.5, via Debian lenny.)  The only\none that was left was \"git remote update\" not having a --quiet option.\nHence the patch.\n\n Documentation/git-remote.txt |    9 ++++++++-\n builtin/remote.c             |   16 ++++++++--------\n 2 files changed, 16 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt\nindex 3fc599c..25f6c05 100644\n--- a/Documentation/git-remote.txt\n+++ b/Documentation/git-remote.txt\n@@ -19,7 +19,8 @@ SYNOPSIS\n 'git remote set-url --delete' [--push] <name> <url>\n 'git remote' [-v | --verbose] 'show' [-n] <name>\n 'git remote prune' [-n | --dry-run] <name>\n-'git remote' [-v | --verbose] 'update' [-p | --prune] [group | remote]...\n+'git remote' [-v | --verbose] [-q | --quiet] 'update'\n+\t     [-p | --prune] [group | remote]...\n \n DESCRIPTION\n -----------\n@@ -30,6 +31,12 @@ Manage the set of repositories (\"remotes\") whose branches you track.\n OPTIONS\n -------\n \n+-q::\n+--quiet::\n+\tPass --quiet to git-fetch.  Progress is not reported to the\n+\tstandard error stream.\n+\tNOTE: This must be placed between `remote` and `subcommand`.\n+\n -v::\n --verbose::\n \tBe a little more verbose and show remote url after name.\ndiff --git a/builtin/remote.c b/builtin/remote.c\nindex 277765b..5447780 100644\n--- a/builtin/remote.c\n+++ b/builtin/remote.c\n@@ -15,7 +15,7 @@ static const char * const builtin_remote_usage[] = {\n \t\"git remote set-head <name> (-a | -d | <branch>)\",\n \t\"git remote [-v | --verbose] show [-n] <name>\",\n \t\"git remote prune [-n | --dry-run] <name>\",\n-\t\"git remote [-v | --verbose] update [-p | --prune] [group | remote]\",\n+\t\"git remote [-v | --verbose] [-q | --quiet] update [-p | --prune] [group | remote]\",\n \t\"git remote set-url <name> <newurl> [<oldurl>]\",\n \t\"git remote set-url --add <name> <newurl>\",\n \t\"git remote set-url --delete <name> <url>\",\n@@ -68,7 +68,7 @@ static const char * const builtin_remote_seturl_usage[] = {\n #define GET_HEAD_NAMES (1<<1)\n #define GET_PUSH_REF_STATES (1<<2)\n \n-static int verbose;\n+static int verbosity;\n \n static int show_all(void);\n static int prune_remote(const char *remote, int dry_run);\n@@ -94,8 +94,8 @@ static int opt_parse_track(const struct option *opt, const char *arg, int not)\n static int fetch_remote(const char *name)\n {\n \tconst char *argv[] = { \"fetch\", name, NULL, NULL };\n-\tif (verbose) {\n-\t\targv[1] = \"-v\";\n+\tif (verbosity != 0) {\n+\t\targv[1] = verbosity > 0 ? \"-v\" : \"-q\";\n \t\targv[2] = name;\n \t}\n \tprintf(\"Updating %s\\n\", name);\n@@ -1246,8 +1246,8 @@ static int update(int argc, const char **argv)\n \n \tif (prune)\n \t\tfetch_argv[fetch_argc++] = \"--prune\";\n-\tif (verbose)\n-\t\tfetch_argv[fetch_argc++] = \"-v\";\n+\tif (verbosity != 0)\n+\t\tfetch_argv[fetch_argc++] = verbosity > 0 ? \"-v\" : \"-q\";\n \tfetch_argv[fetch_argc++] = \"--multiple\";\n \tif (argc < 2)\n \t\tfetch_argv[fetch_argc++] = \"default\";\n@@ -1395,7 +1395,7 @@ static int show_all(void)\n \t\tsort_string_list(&list);\n \t\tfor (i = 0; i < list.nr; i++) {\n \t\t\tstruct string_list_item *item = list.items + i;\n-\t\t\tif (verbose)\n+\t\t\tif (verbosity > 0)\n \t\t\t\tprintf(\"%s\\t%s\\n\", item->string,\n \t\t\t\t\titem->util ? (const char *)item->util : \"\");\n \t\t\telse {\n@@ -1412,7 +1412,7 @@ static int show_all(void)\n int cmd_remote(int argc, const char **argv, const char *prefix)\n {\n \tstruct option options[] = {\n-\t\tOPT_BOOLEAN('v', \"verbose\", &verbose, \"be verbose; must be placed before a subcommand\"),\n+\t\tOPT__VERBOSITY(&verbosity),\n \t\tOPT_END()\n \t};\n \tint result;\n-- \n1.5.6.5\n"},{"id":"139650","messageId":"o2xbe6fef0d1004151959h6dd0405bhc669fe6284a66044@mail.gmail.com","threadId":"23486","inReplyTo":"E1O2XT7-00011E-RT@lake.fysh.org","subject":"Re: [PATCH] Support \"git remote --quiet update\"","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-04-16T02:59:31Z","receivedAt":"2010-04-16T02:59:31Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Hi,\n\nOn Fri, Apr 16, 2010 at 6:11 AM, Zefram <zefram@fysh.org> wrote:\n> Add --quiet option for git-remote, which it will pass on to git-fetch.\n\nSigned-off-by?\n\n  http://github.com/git/git/blob/master/Documentation/SubmittingPatches\n\n-- \nCheers,\nRay Chuan\n"}]}