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

5 messages, 3 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:40

"Tuncer Ayaz" [off-list ref] writes:
I think you need to have something like the following applied on top of
what's in pu to be able to use "pull -v -v -v" and be able to count the
occurrences via parse-options.c. What do you think?
Makes sense, except that as a futureproofing we may be better off doing
the same for -q as well.
quoted hunk
--- git-pull.sh 2008-11-17 11:32:19.000000000 +0100
+++ git-pull.sh.b       2008-11-17 11:33:03.000000000 +0100
@@ -26,7 +26,7 @@
        -q|--quiet)
                verbosity=-q ;;
        -v|--verbose)
-               verbosity=-v ;;
+               verbosity="$verbosity -v" ;;
        -n|--no-stat|--no-summary)
                no_stat=-n ;;
        --stat|--summary)
Signed-off-by: Tuncer Ayaz <redacted>

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

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

On Mon, Nov 17, 2008 at 11:51 AM, Junio C Hamano [off-list ref] wrote:
"Tuncer Ayaz" [off-list ref] writes:
quoted
I think you need to have something like the following applied on top of
what's in pu to be able to use "pull -v -v -v" and be able to count the
occurrences via parse-options.c. What do you think?
Makes sense, except that as a futureproofing we may be better off doing
the same for -q as well.
What's funny is that my original patch to git-pull.sh had both :).
quoted
--- git-pull.sh 2008-11-17 11:32:19.000000000 +0100
+++ git-pull.sh.b       2008-11-17 11:33:03.000000000 +0100
@@ -26,7 +26,7 @@
        -q|--quiet)
                verbosity=-q ;;
        -v|--verbose)
-               verbosity=-v ;;
+               verbosity="$verbosity -v" ;;
        -n|--no-stat|--no-summary)
                no_stat=-n ;;
        --stat|--summary)
Signed-off-by: Tuncer Ayaz <redacted>

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

From: Constantine Plotnikov <hidden>
Date: 2016-06-15 22:45:40

On Mon, Nov 17, 2008 at 1:51 PM, Junio C Hamano [off-list ref] wrote:
"Tuncer Ayaz" [off-list ref] writes:
quoted
I think you need to have something like the following applied on top of
what's in pu to be able to use "pull -v -v -v" and be able to count the
occurrences via parse-options.c. What do you think?
I'm just interested why not just optional level argument to verbosity
like --verbose=2 or -v2?

Regards,
Constantine

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

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

On Mon, Nov 17, 2008 at 11:51 AM, Junio C Hamano [off-list ref] wrote:
"Tuncer Ayaz" [off-list ref] writes:
quoted
I think you need to have something like the following applied on top of
what's in pu to be able to use "pull -v -v -v" and be able to count the
occurrences via parse-options.c. What do you think?
Makes sense, except that as a futureproofing we may be better off doing
the same for -q as well.
Please see my patch with the following subject arriving here soonish:
"[PATCH] Retain multiple -q/-v occurrences in git pull"
quoted
--- git-pull.sh 2008-11-17 11:32:19.000000000 +0100
+++ git-pull.sh.b       2008-11-17 11:33:03.000000000 +0100
@@ -26,7 +26,7 @@
        -q|--quiet)
                verbosity=-q ;;
        -v|--verbose)
-               verbosity=-v ;;
+               verbosity="$verbosity -v" ;;
        -n|--no-stat|--no-summary)
                no_stat=-n ;;
        --stat|--summary)
Signed-off-by: Tuncer Ayaz <redacted>

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

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

On Mon, Nov 17, 2008 at 12:03 PM, Constantine Plotnikov
[off-list ref] wrote:
On Mon, Nov 17, 2008 at 1:51 PM, Junio C Hamano [off-list ref] wrote:
quoted
"Tuncer Ayaz" [off-list ref] writes:
quoted
I think you need to have something like the following applied on top of
what's in pu to be able to use "pull -v -v -v" and be able to count the
occurrences via parse-options.c. What do you think?
I'm just interested why not just optional level argument to verbosity
like --verbose=2 or -v2?
I'm not really sure which one is better but do prefer the
"-v -v -v" way as it seems to be common practice in tools
that support it. Also I don't want to make git cli different than
most other cli tools. This does not mean that common practice
is the best choice.

I think allowing an integer param makes our cli worse and
allows usage like --verbose=25. verbose=25 is not sane
in my personal view.

$ git pull --verbose # same as --verbose=1?
$ git pull --verbose=42 # will do the right thing always by AI?
$ git pull --verbose=0 # will do what? maybe quiet=1?

I say let's keep it simple so that no one starts getting the
idea that it's fine to have more than a handful occurrences
of -v or -q.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help