{"thread":{"id":"16341","subject":"[PATCH] Teach/Fix pull/fetch -q/-v options","startedAt":"2008-11-15T19:23:00Z","lastAt":"2008-11-17T22:24:38Z","messageCount":7,"participants":["Tuncer Ayaz","Junio C Hamano","Constantine Plotnikov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"95899","messageId":"1226776980-9674-1-git-send-email-tuncer.ayaz@gmail.com","threadId":"16341","inReplyTo":null,"subject":"[PATCH] Teach/Fix pull/fetch -q/-v options","fromName":"Tuncer Ayaz","fromEmail":"tuncer.ayaz@gmail.com","sentAt":"2008-11-15T19:23:00Z","receivedAt":"2008-11-15T19:23:00Z","isPatch":true,"sender":{"key":"tuncer.ayaz@gmail.com","avatar":null},"body":"Implement git-pull --quiet and git-pull --verbose by\nadding the options to git-pull and fixing verbosity\nhandling in git-fetch.\n\nSigned-off-by: Tuncer Ayaz <tuncer.ayaz@gmail.com>\n---\n Documentation/merge-options.txt |    8 +++++\n builtin-fetch.c                 |   19 ++++++------\n builtin-merge.c                 |   21 +++++++++----\n git-pull.sh                     |   10 ++++--\n parse-options.c                 |   22 ++++++++++++++\n parse-options.h                 |    6 ++++\n t/t5521-pull-options.sh         |   60 +++++++++++++++++++++++++++++++++++++++\n 7 files changed, 126 insertions(+), 20 deletions(-)\n create mode 100755 t/t5521-pull-options.sh\n\ndiff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt\nindex 007909a..427cdef 100644\n--- a/Documentation/merge-options.txt\n+++ b/Documentation/merge-options.txt\n@@ -1,3 +1,11 @@\n+-q::\n+--quiet::\n+\tOperate quietly.\n+\n+-v::\n+--verbose::\n+\tBe verbose.\n+\n --stat::\n \tShow a diffstat at the end of the merge. The diffstat is also\n \tcontrolled by the configuration option merge.stat.\ndiff --git a/builtin-fetch.c b/builtin-fetch.c\nindex f151cfa..7568163 100644\n--- a/builtin-fetch.c\n+++ b/builtin-fetch.c\n@@ -22,7 +22,7 @@ enum {\n \tTAGS_SET = 2\n };\n \n-static int append, force, keep, update_head_ok, verbose, quiet;\n+static int append, force, keep, update_head_ok, verbosity;\n static int tags = TAGS_DEFAULT;\n static const char *depth;\n static const char *upload_pack;\n@@ -30,8 +30,7 @@ static struct strbuf default_rla = STRBUF_INIT;\n static struct transport *transport;\n \n static struct option builtin_fetch_options[] = {\n-\tOPT__QUIET(&quiet),\n-\tOPT__VERBOSE(&verbose),\n+\tOPT__VERBOSITY(&verbosity),\n \tOPT_BOOLEAN('a', \"append\", &append,\n \t\t    \"append to .git/FETCH_HEAD instead of overwriting\"),\n \tOPT_STRING(0, \"upload-pack\", &upload_pack, \"PATH\",\n@@ -192,7 +191,6 @@ static int s_update_ref(const char *action,\n \n static int update_local_ref(struct ref *ref,\n \t\t\t    const char *remote,\n-\t\t\t    int verbose,\n \t\t\t    char *display)\n {\n \tstruct commit *current = NULL, *updated;\n@@ -210,7 +208,7 @@ static int update_local_ref(struct ref *ref,\n \t\tdie(\"object %s not found\", sha1_to_hex(ref->new_sha1));\n \n \tif (!hashcmp(ref->old_sha1, ref->new_sha1)) {\n-\t\tif (verbose)\n+\t\tif (verbosity > 0)\n \t\t\tsprintf(display, \"= %-*s %-*s -> %s\", SUMMARY_WIDTH,\n \t\t\t\t\"[up to date]\", REFCOL_WIDTH, remote,\n \t\t\t\tpretty_ref);\n@@ -366,18 +364,19 @@ static int store_updated_refs(const char *url, const char *remote_name,\n \t\t\tnote);\n \n \t\tif (ref)\n-\t\t\trc |= update_local_ref(ref, what, verbose, note);\n+\t\t\trc |= update_local_ref(ref, what, note);\n \t\telse\n \t\t\tsprintf(note, \"* %-*s %-*s -> FETCH_HEAD\",\n \t\t\t\tSUMMARY_WIDTH, *kind ? kind : \"branch\",\n \t\t\t\t REFCOL_WIDTH, *what ? what : \"HEAD\");\n \t\tif (*note) {\n-\t\t\tif (!shown_url) {\n+\t\t\tif (verbosity >= 0 && !shown_url) {\n \t\t\t\tfprintf(stderr, \"From %.*s\\n\",\n \t\t\t\t\t\turl_len, url);\n \t\t\t\tshown_url = 1;\n \t\t\t}\n-\t\t\tfprintf(stderr, \" %s\\n\", note);\n+\t\t\tif (verbosity >= 0)\n+\t\t\t\tfprintf(stderr, \" %s\\n\", note);\n \t\t}\n \t}\n \tfclose(fp);\n@@ -637,9 +636,9 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)\n \t\tremote = remote_get(argv[0]);\n \n \ttransport = transport_get(remote, remote->url[0]);\n-\tif (verbose >= 2)\n+\tif (verbosity >= 2)\n \t\ttransport->verbose = 1;\n-\tif (quiet)\n+\tif (verbosity < 0)\n \t\ttransport->verbose = -1;\n \tif (upload_pack)\n \t\tset_option(TRANS_OPT_UPLOADPACK, upload_pack);\ndiff --git a/builtin-merge.c b/builtin-merge.c\nindex 5e7910b..7c2b90c 100644\n--- a/builtin-merge.c\n+++ b/builtin-merge.c\n@@ -50,6 +50,7 @@ static unsigned char head[20], stash[20];\n static struct strategy **use_strategies;\n static size_t use_strategies_nr, use_strategies_alloc;\n static const char *branch;\n+static int verbosity;\n \n static struct strategy all_strategy[] = {\n \t{ \"recursive\",  DEFAULT_TWOHEAD | NO_TRIVIAL },\n@@ -171,6 +172,7 @@ static struct option builtin_merge_options[] = {\n \tOPT_CALLBACK('m', \"message\", &merge_msg, \"message\",\n \t\t\"message to be used for the merge commit (if any)\",\n \t\toption_parse_message),\n+\tOPT__VERBOSITY(&verbosity),\n \tOPT_END()\n };\n \n@@ -250,7 +252,8 @@ static void restore_state(void)\n /* This is called when no merge was necessary. */\n static void finish_up_to_date(const char *msg)\n {\n-\tprintf(\"%s%s\\n\", squash ? \" (nothing to squash)\" : \"\", msg);\n+\tif (verbosity >= 0)\n+\t\tprintf(\"%s%s\\n\", squash ? \" (nothing to squash)\" : \"\", msg);\n \tdrop_save();\n }\n \n@@ -331,14 +334,15 @@ static void finish(const unsigned char *new_head, const char *msg)\n \tif (!msg)\n \t\tstrbuf_addstr(&reflog_message, getenv(\"GIT_REFLOG_ACTION\"));\n \telse {\n-\t\tprintf(\"%s\\n\", msg);\n+\t\tif (verbosity >= 0)\n+\t\t\tprintf(\"%s\\n\", msg);\n \t\tstrbuf_addf(&reflog_message, \"%s: %s\",\n \t\t\tgetenv(\"GIT_REFLOG_ACTION\"), msg);\n \t}\n \tif (squash) {\n \t\tsquash_message();\n \t} else {\n-\t\tif (!merge_msg.len)\n+\t\tif (verbosity >= 0 && !merge_msg.len)\n \t\t\tprintf(\"No merge message -- not updating HEAD\\n\");\n \t\telse {\n \t\t\tconst char *argv_gc_auto[] = { \"gc\", \"--auto\", NULL };\n@@ -872,6 +876,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \n \targc = parse_options(argc, argv, builtin_merge_options,\n \t\t\tbuiltin_merge_usage, 0);\n+\tif (verbosity < 0)\n+\t\tshow_diffstat = 0;\n \n \tif (squash) {\n \t\tif (!allow_fast_forward)\n@@ -1013,10 +1019,11 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \n \t\tstrcpy(hex, find_unique_abbrev(head, DEFAULT_ABBREV));\n \n-\t\tprintf(\"Updating %s..%s\\n\",\n-\t\t\thex,\n-\t\t\tfind_unique_abbrev(remoteheads->item->object.sha1,\n-\t\t\tDEFAULT_ABBREV));\n+\t\tif (verbosity >= 0)\n+\t\t\tprintf(\"Updating %s..%s\\n\",\n+\t\t\t\thex,\n+\t\t\t\tfind_unique_abbrev(remoteheads->item->object.sha1,\n+\t\t\t\tDEFAULT_ABBREV));\n \t\tstrbuf_addstr(&msg, \"Fast forward\");\n \t\tif (have_message)\n \t\t\tstrbuf_addstr(&msg,\ndiff --git a/git-pull.sh b/git-pull.sh\nindex 664fe34..a9dc713 100755\n--- a/git-pull.sh\n+++ b/git-pull.sh\n@@ -16,13 +16,17 @@ cd_to_toplevel\n test -z \"$(git ls-files -u)\" ||\n \tdie \"You are in the middle of a conflicted merge.\"\n \n-strategy_args= no_stat= no_commit= squash= no_ff= log_arg=\n+strategy_args= no_stat= no_commit= squash= no_ff= log_arg= verbosity=\n curr_branch=$(git symbolic-ref -q HEAD)\n curr_branch_short=$(echo \"$curr_branch\" | sed \"s|refs/heads/||\")\n rebase=$(git config --bool branch.$curr_branch_short.rebase)\n while :\n do\n \tcase \"$1\" in\n+\t-q|--quiet)\n+\t\tverbosity=-q ;;\n+\t-v|--verbose)\n+\t\tverbosity=\"$verbosity -v\" ;;\n \t-n|--no-stat|--no-summary)\n \t\tno_stat=-n ;;\n \t--stat|--summary)\n@@ -121,7 +125,7 @@ test true = \"$rebase\" && {\n \t\t\"refs/remotes/$origin/$reflist\" 2>/dev/null)\"\n }\n orig_head=$(git rev-parse --verify HEAD 2>/dev/null)\n-git fetch --update-head-ok \"$@\" || exit 1\n+git fetch $verbosity --update-head-ok \"$@\" || exit 1\n \n curr_head=$(git rev-parse --verify HEAD 2>/dev/null)\n if test -n \"$orig_head\" && test \"$curr_head\" != \"$orig_head\"\n@@ -182,4 +186,4 @@ test true = \"$rebase\" &&\n \texec git-rebase $strategy_args --onto $merge_head \\\n \t${oldremoteref:-$merge_head}\n exec git-merge $no_stat $no_commit $squash $no_ff $log_arg $strategy_args \\\n-\t\"$merge_name\" HEAD $merge_head\n+\t\"$merge_name\" HEAD $merge_head $verbosity\ndiff --git a/parse-options.c b/parse-options.c\nindex fd08bb4..9eb55cc 100644\n--- a/parse-options.c\n+++ b/parse-options.c\n@@ -484,6 +484,28 @@ int parse_opt_approxidate_cb(const struct option *opt, const char *arg,\n \treturn 0;\n }\n \n+int parse_opt_verbosity_cb(const struct option *opt, const char *arg,\n+\t\t\t   int unset)\n+{\n+\tint *target = opt->value;\n+\n+\tif (unset)\n+\t\t/* --no-quiet, --no-verbose */\n+\t\t*target = 0;\n+\telse if (opt->short_name == 'v') {\n+\t\tif (*target >= 0)\n+\t\t\t(*target)++;\n+\t\telse\n+\t\t\t*target = 1;\n+\t} else {\n+\t\tif (*target <= 0)\n+\t\t\t(*target)--;\n+\t\telse\n+\t\t\t*target = -1;\n+\t}\n+\treturn 0;\n+}\n+\n /*\n  * This should really be OPTION_FILENAME type as a part of\n  * parse_options that take prefix to do this while parsing.\ndiff --git a/parse-options.h b/parse-options.h\nindex 5199950..034162e 100644\n--- a/parse-options.h\n+++ b/parse-options.h\n@@ -150,9 +150,15 @@ extern int parse_options_end(struct parse_opt_ctx_t *ctx);\n /*----- some often used options -----*/\n extern int parse_opt_abbrev_cb(const struct option *, const char *, int);\n extern int parse_opt_approxidate_cb(const struct option *, const char *, int);\n+extern int parse_opt_verbosity_cb(const struct option *, const char *, int);\n \n #define OPT__VERBOSE(var)  OPT_BOOLEAN('v', \"verbose\", (var), \"be verbose\")\n #define OPT__QUIET(var)    OPT_BOOLEAN('q', \"quiet\",   (var), \"be quiet\")\n+#define OPT__VERBOSITY(var) \\\n+\t{ OPTION_CALLBACK, 'v', \"verbose\", (var), NULL, \"be more verbose\", \\\n+\t  PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }, \\\n+\t{ OPTION_CALLBACK, 'q', \"quiet\", (var), NULL, \"be more quiet\", \\\n+\t  PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }\n #define OPT__DRY_RUN(var)  OPT_BOOLEAN('n', \"dry-run\", (var), \"dry run\")\n #define OPT__ABBREV(var)  \\\n \t{ OPTION_CALLBACK, 0, \"abbrev\", (var), \"n\", \\\ndiff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh\nnew file mode 100755\nindex 0000000..83e2e8a\n--- /dev/null\n+++ b/t/t5521-pull-options.sh\n@@ -0,0 +1,60 @@\n+#!/bin/sh\n+\n+test_description='pull options'\n+\n+. ./test-lib.sh\n+\n+D=`pwd`\n+\n+test_expect_success 'setup' '\n+\tmkdir parent &&\n+\t(cd parent && git init &&\n+\t echo one >file && git add file &&\n+\t git commit -m one)\n+'\n+\n+cd \"$D\"\n+\n+test_expect_success 'git pull -q' '\n+\tmkdir clonedq &&\n+\tcd clonedq &&\n+\tgit pull -q \"$D/parent\" >out 2>err &&\n+\ttest ! -s out\n+'\n+\n+cd \"$D\"\n+\n+test_expect_success 'git pull' '\n+\tmkdir cloned &&\n+\tcd cloned &&\n+\tgit pull \"$D/parent\" >out 2>err &&\n+\ttest -s out\n+'\n+cd \"$D\"\n+\n+test_expect_success 'git pull -v' '\n+\tmkdir clonedv &&\n+\tcd clonedv &&\n+\tgit pull -v \"$D/parent\" >out 2>err &&\n+\ttest -s out\n+'\n+\n+cd \"$D\"\n+\n+test_expect_success 'git pull -v -q' '\n+\tmkdir clonedvq &&\n+\tcd clonedvq &&\n+\tgit pull -v -q \"$D/parent\" >out 2>err &&\n+\ttest ! -s out\n+'\n+\n+cd \"$D\"\n+\n+test_expect_success 'git pull -q -v' '\n+\tmkdir clonedqv &&\n+\tcd clonedqv &&\n+\tgit pull -q -v \"$D/parent\" >out 2>err &&\n+\ttest -s out\n+'\n+\n+test_done\n-- \n1.6.0.2.GIT\n"},{"id":"96024","messageId":"4ac8254d0811170237o78060cb3k4a64dceaa3a475d0@mail.gmail.com","threadId":"16341","inReplyTo":"1226776980-9674-1-git-send-email-tuncer.ayaz@gmail.com","subject":"Re: [PATCH] Teach/Fix pull/fetch -q/-v options","fromName":"Tuncer Ayaz","fromEmail":"tuncer.ayaz@gmail.com","sentAt":"2008-11-17T10:37:07Z","receivedAt":"2008-11-17T10:37:07Z","isPatch":true,"sender":{"key":"tuncer.ayaz@gmail.com","avatar":null},"body":"Junio,\n\nI think you need to have something like the following applied on top of\nwhat's in pu to be able to use \"pull -v -v -v\" and be able to count the\noccurrences via parse-options.c. What do you think?\n\n--- git-pull.sh 2008-11-17 11:32:19.000000000 +0100\n+++ git-pull.sh.b       2008-11-17 11:33:03.000000000 +0100\n@@ -26,7 +26,7 @@\n        -q|--quiet)\n                verbosity=-q ;;\n        -v|--verbose)\n-               verbosity=-v ;;\n+               verbosity=\"$verbosity -v\" ;;\n        -n|--no-stat|--no-summary)\n                no_stat=-n ;;\n        --stat|--summary)\n\nSigned-off-by: Tuncer Ayaz <tuncer.ayaz@gmail.com>\n"},{"id":"96029","messageId":"7vy6ziy69h.fsf@gitster.siamese.dyndns.org","threadId":"16341","inReplyTo":"4ac8254d0811170237o78060cb3k4a64dceaa3a475d0@mail.gmail.com","subject":"Re: [PATCH] Teach/Fix pull/fetch -q/-v options","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-11-17T10:51:54Z","receivedAt":"2008-11-17T10:51:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Tuncer Ayaz\" <tuncer.ayaz@gmail.com> writes:\n\n> I think you need to have something like the following applied on top of\n> what's in pu to be able to use \"pull -v -v -v\" and be able to count the\n> occurrences via parse-options.c. What do you think?\n\nMakes sense, except that as a futureproofing we may be better off doing\nthe same for -q as well.\n\n> --- git-pull.sh 2008-11-17 11:32:19.000000000 +0100\n> +++ git-pull.sh.b       2008-11-17 11:33:03.000000000 +0100\n> @@ -26,7 +26,7 @@\n>         -q|--quiet)\n>                 verbosity=-q ;;\n>         -v|--verbose)\n> -               verbosity=-v ;;\n> +               verbosity=\"$verbosity -v\" ;;\n>         -n|--no-stat|--no-summary)\n>                 no_stat=-n ;;\n>         --stat|--summary)\n>\n> Signed-off-by: Tuncer Ayaz <tuncer.ayaz@gmail.com>\n"},{"id":"96030","messageId":"4ac8254d0811170255t4706f8efu5d60f4f05cbdab4@mail.gmail.com","threadId":"16341","inReplyTo":"7vy6ziy69h.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Teach/Fix pull/fetch -q/-v options","fromName":"Tuncer Ayaz","fromEmail":"tuncer.ayaz@gmail.com","sentAt":"2008-11-17T10:55:59Z","receivedAt":"2008-11-17T10:55:59Z","isPatch":true,"sender":{"key":"tuncer.ayaz@gmail.com","avatar":null},"body":"On Mon, Nov 17, 2008 at 11:51 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> \"Tuncer Ayaz\" <tuncer.ayaz@gmail.com> writes:\n>\n>> I think you need to have something like the following applied on top of\n>> what's in pu to be able to use \"pull -v -v -v\" and be able to count the\n>> occurrences via parse-options.c. What do you think?\n>\n> Makes sense, except that as a futureproofing we may be better off doing\n> the same for -q as well.\n\nWhat's funny is that my original patch to git-pull.sh had both :).\n\n>> --- git-pull.sh 2008-11-17 11:32:19.000000000 +0100\n>> +++ git-pull.sh.b       2008-11-17 11:33:03.000000000 +0100\n>> @@ -26,7 +26,7 @@\n>>         -q|--quiet)\n>>                 verbosity=-q ;;\n>>         -v|--verbose)\n>> -               verbosity=-v ;;\n>> +               verbosity=\"$verbosity -v\" ;;\n>>         -n|--no-stat|--no-summary)\n>>                 no_stat=-n ;;\n>>         --stat|--summary)\n>>\n>> Signed-off-by: Tuncer Ayaz <tuncer.ayaz@gmail.com>\n>\n"},{"id":"96031","messageId":"85647ef50811170303i17049994n356c384693502685@mail.gmail.com","threadId":"16341","inReplyTo":"7vy6ziy69h.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Teach/Fix pull/fetch -q/-v options","fromName":"Constantine Plotnikov","fromEmail":"constantine.plotnikov@gmail.com","sentAt":"2008-11-17T11:03:00Z","receivedAt":"2008-11-17T11:03:00Z","isPatch":true,"sender":{"key":"constantine.plotnikov@gmail.com","avatar":null},"body":"On Mon, Nov 17, 2008 at 1:51 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> \"Tuncer Ayaz\" <tuncer.ayaz@gmail.com> writes:\n>\n>> I think you need to have something like the following applied on top of\n>> what's in pu to be able to use \"pull -v -v -v\" and be able to count the\n>> occurrences via parse-options.c. What do you think?\n>\nI'm just interested why not just optional level argument to verbosity\nlike --verbose=2 or -v2?\n\nRegards,\nConstantine\n"},{"id":"96060","messageId":"4ac8254d0811171408o1845fca7kea23b16b076b2818@mail.gmail.com","threadId":"16341","inReplyTo":"7vy6ziy69h.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Teach/Fix pull/fetch -q/-v options","fromName":"Tuncer Ayaz","fromEmail":"tuncer.ayaz@gmail.com","sentAt":"2008-11-17T22:08:18Z","receivedAt":"2008-11-17T22:08:18Z","isPatch":true,"sender":{"key":"tuncer.ayaz@gmail.com","avatar":null},"body":"On Mon, Nov 17, 2008 at 11:51 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> \"Tuncer Ayaz\" <tuncer.ayaz@gmail.com> writes:\n>\n>> I think you need to have something like the following applied on top of\n>> what's in pu to be able to use \"pull -v -v -v\" and be able to count the\n>> occurrences via parse-options.c. What do you think?\n>\n> Makes sense, except that as a futureproofing we may be better off doing\n> the same for -q as well.\n\nPlease see my patch with the following subject arriving here soonish:\n\"[PATCH] Retain multiple -q/-v occurrences in git pull\"\n\n>> --- git-pull.sh 2008-11-17 11:32:19.000000000 +0100\n>> +++ git-pull.sh.b       2008-11-17 11:33:03.000000000 +0100\n>> @@ -26,7 +26,7 @@\n>>         -q|--quiet)\n>>                 verbosity=-q ;;\n>>         -v|--verbose)\n>> -               verbosity=-v ;;\n>> +               verbosity=\"$verbosity -v\" ;;\n>>         -n|--no-stat|--no-summary)\n>>                 no_stat=-n ;;\n>>         --stat|--summary)\n>>\n>> Signed-off-by: Tuncer Ayaz <tuncer.ayaz@gmail.com>\n>\n"},{"id":"96065","messageId":"4ac8254d0811171424t43676207v5d842ba8ab6e2944@mail.gmail.com","threadId":"16341","inReplyTo":"85647ef50811170303i17049994n356c384693502685@mail.gmail.com","subject":"Re: [PATCH] Teach/Fix pull/fetch -q/-v options","fromName":"Tuncer Ayaz","fromEmail":"tuncer.ayaz@gmail.com","sentAt":"2008-11-17T22:24:38Z","receivedAt":"2008-11-17T22:24:38Z","isPatch":true,"sender":{"key":"tuncer.ayaz@gmail.com","avatar":null},"body":"On Mon, Nov 17, 2008 at 12:03 PM, Constantine Plotnikov\n<constantine.plotnikov@gmail.com> wrote:\n> On Mon, Nov 17, 2008 at 1:51 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> \"Tuncer Ayaz\" <tuncer.ayaz@gmail.com> writes:\n>>\n>>> I think you need to have something like the following applied on top of\n>>> what's in pu to be able to use \"pull -v -v -v\" and be able to count the\n>>> occurrences via parse-options.c. What do you think?\n>>\n> I'm just interested why not just optional level argument to verbosity\n> like --verbose=2 or -v2?\n\nI'm not really sure which one is better but do prefer the\n\"-v -v -v\" way as it seems to be common practice in tools\nthat support it. Also I don't want to make git cli different than\nmost other cli tools. This does not mean that common practice\nis the best choice.\n\nI think allowing an integer param makes our cli worse and\nallows usage like --verbose=25. verbose=25 is not sane\nin my personal view.\n\n$ git pull --verbose # same as --verbose=1?\n$ git pull --verbose=42 # will do the right thing always by AI?\n$ git pull --verbose=0 # will do what? maybe quiet=1?\n\nI say let's keep it simple so that no one starts getting the\nidea that it's fine to have more than a handful occurrences\nof -v or -q.\n"}]}