Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

Re: [PATCH] Teach/Fix pull/fetch -q/-v options

From: Tuncer Ayaz <hidden>
Date: 2016-06-15 22:45:39

On Sat, Nov 15, 2008 at 6:42 PM, Tuncer Ayaz [off-list ref] wrote:
On Sat, Nov 15, 2008 at 2:15 AM, Junio C Hamano [off-list ref] wrote:
quoted
quoted
@@ -637,9 +638,9 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
              remote = remote_get(argv[0]);

      transport = transport_get(remote, remote->url[0]);
-     if (verbose >= 2)
+     if (verbosity == VERBOSE)
              transport->verbose = 1;
-     if (quiet)
+     if (verbosity == QUIET)
              transport->verbose = -1;
      if (upload_pack)
              set_option(TRANS_OPT_UPLOADPACK, upload_pack);
In the original code, the variable verbose can be ">= 2" when "-v -v" is
given, so transport->verbose is not turned on with a single "-v" alone
(this correctly mimics the original behaviour in the scripted version).
Doesn't this also mean that we need to be able to concatenate
multiple -v options in git-pull.sh similar to what one of the first
versions of my patch did?

<snip>
The next patch revision arriving here in a minute or two
will do the following in git-pull.sh:
1) if -q then verbosity=-q
2) if -v then verbosity=verbosity + -v

This means that git pull -v -q will reset verbosity to -q
and allow counting of -v instances. If this is not desired
or incorrect another change is needed :-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help