From: Junio C Hamano <gitster@pobox.com>
To: "Tuncer Ayaz" <tuncer.ayaz@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] Teach/Fix pull/fetch -q/-v options
Date: Mon, 20 Oct 2008 16:54:55 -0700 [thread overview]
Message-ID: <7vwsg22568.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <4ac8254d0810200935sf7ad873tea53c0fb53bbe1c0@mail.gmail.com> (Tuncer Ayaz's message of "Mon, 20 Oct 2008 18:35:33 +0200")
"Tuncer Ayaz" <tuncer.ayaz@gmail.com> writes:
> On Sun, Oct 19, 2008 at 11:26 PM, Junio C Hamano <gitster@pobox.com> wrote:
> ...
>>> @@ -23,6 +24,10 @@ rebase=$(git config --bool branch.$curr_branch_short.rebase)
>>> while :
>>> do
>>> case "$1" in
>>> + -q|--quiet)
>>> + verbosity="$verbosity -q" ;;
>>> + -v|--verbose)
>>> + verbosity="$verbosity -v" ;;
>>
>> You know verbosity flags (-q and -v) are "the last one wins", so I do not
>> see much point in this concatenation.
>
> Without concatenation I would need to analyze the content
> of the variable each time the option is passed to the shell
> script. Do you know of a simpler/better way still keeping the
> functionality that
> $ git pull -q -v --quiet --verbose --quiet gives verbosity=QUIET
> and
> $ git pull -q -v --quiet --verbose --quiet -v yields verbosity=VERBOSE
> ?
Wouldn't
verbosity=
while :
do
case "$1" in
-q|--quiet) verbosity=-q ;;
-v|--verbose) verbosity=-v ;;
... others ...
esac
shift
done
git pull $verbosity other options
give the -q for the former and -v for the latter to "git pull"?
next prev parent reply other threads:[~2008-10-20 23:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-19 19:48 [PATCH] Teach/Fix pull/fetch -q/-v options Tuncer Ayaz
2008-10-19 21:26 ` Junio C Hamano
2008-10-20 16:35 ` Tuncer Ayaz
2008-10-20 23:54 ` Junio C Hamano [this message]
2008-10-21 16:25 ` Tuncer Ayaz
-- strict thread matches above, loose matches on Subject: below --
2008-10-20 16:28 Tuncer Ayaz
2008-10-21 16:30 Tuncer Ayaz
2008-10-27 10:08 ` Nanako Shiraishi
2008-10-28 3:21 ` Junio C Hamano
2008-11-01 17:23 ` Tuncer Ayaz
2008-11-07 3:26 ` Tuncer Ayaz
2008-11-07 3:26 Tuncer Ayaz
2008-11-10 23:43 ` Tuncer Ayaz
2008-11-12 20:47 ` Junio C Hamano
2008-11-15 0:09 ` Tuncer Ayaz
2008-11-15 0:14 Tuncer Ayaz
2008-11-15 1:15 ` Junio C Hamano
2008-11-15 1:53 ` Tuncer Ayaz
2008-11-15 3:10 ` Junio C Hamano
2008-11-15 17:28 ` Tuncer Ayaz
2008-11-15 17:42 ` Tuncer Ayaz
2008-11-15 19:16 ` Tuncer Ayaz
2008-11-15 19:23 Tuncer Ayaz
2008-11-17 10:37 ` Tuncer Ayaz
2008-11-17 10:51 ` Junio C Hamano
2008-11-17 10:55 ` Tuncer Ayaz
2008-11-17 11:03 ` Constantine Plotnikov
2008-11-17 22:24 ` Tuncer Ayaz
2008-11-17 22:08 ` Tuncer Ayaz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vwsg22568.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=tuncer.ayaz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).