From: Junio C Hamano <gitster@pobox•com>
To: Ilya Bobyr <ilya.bobyr@gmail•com>
Cc: Ramsay Jones <ramsay@ramsay1•demon.co.uk>,
git@vger•kernel.org, Thomas Rast <trast@inf•ethz.ch>,
Eric Sunshine <sunshine@sunshineco•com>
Subject: Re: [PATCH 1/3] test-lib: Document short options in t/README
Date: Fri, 28 Mar 2014 10:20:19 -0700 [thread overview]
Message-ID: <xmqqvbuyb5po.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqqd2h7fvkw.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Thu, 27 Mar 2014 09:35:43 -0700")
Junio C Hamano <gitster@pobox•com> writes:
> Ilya Bobyr <ilya.bobyr@gmail•com> writes:
>
>> If there is decision on how shortening should work for all the
>> options, maybe I could add a paragraph on that and make existing
>> options more consistent.
>
> We should strive to make the following from gitcli.txt apply
> throughout the system:
>
> * many commands allow a long option `--option` to be abbreviated
> only to their unique prefix (e.g. if there is no other option
> whose name begins with `opt`, you may be able to spell `--opt` to
> invoke the `--option` flag), but you should fully spell them out
> when writing your scripts; later versions of Git may introduce a
> new option whose name shares the same prefix, e.g. `--optimize`,
> to make a short prefix that used to be unique no longer unique.
>
>> If so, '--valgrind' becomes impossible to shorten because there
>> is '--valgrind-only' that is a separate option. Same for
>> '--verbose' and '--verbose-only'.
>
> Correct. If you really cared, --valgrind={yes,no,only} would be (or
> have been) a better possibility, though.
Also, these existing bits are simply being lazy. You do not have to
emulate and spread the laziness.
t/test-lib.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 87f327f..f37973a 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -209,10 +209,10 @@ do
--va|--val|--valg|--valgr|--valgri|--valgrin|--valgrind)
valgrind=memcheck
shift ;;
- --valgrind=*)
+ --va=*|--val=*|--valg=*|--valgr=*|--valgri=*|--valgrin=*|--valgrind=*)
valgrind=$(expr "z$1" : 'z[^=]*=\(.*\)')
shift ;;
- --valgrind-only=*)
+ --valgrind-o=*|--valgrind-on=*|--valgrind-onl=*|--valgrind-only=*)
valgrind_only=$(expr "z$1" : 'z[^=]*=\(.*\)')
shift ;;
--tee)
next prev parent reply other threads:[~2014-03-28 17:20 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-24 8:49 [RFC/PATCH] Better control of the tests run by a test suite Ilya Bobyr
2014-03-24 8:49 ` [PATCH 1/3] test-lib: Document short options in t/README Ilya Bobyr
2014-03-24 11:39 ` Ramsay Jones
2014-03-24 17:19 ` Ilya Bobyr
2014-03-25 17:23 ` Junio C Hamano
2014-03-27 9:39 ` Ilya Bobyr
2014-03-27 16:35 ` Junio C Hamano
2014-03-28 17:20 ` Junio C Hamano [this message]
2014-03-25 5:52 ` Eric Sunshine
2014-03-24 8:49 ` [PATCH 2/3] test-lib: tests skipped by GIT_SKIP_TESTS say so Ilya Bobyr
2014-03-24 8:49 ` [PATCH 3/3] test-lib: '--run' to run only specific tests Ilya Bobyr
2014-03-24 23:03 ` [RFC/PATCH] Better control of the tests run by a test suite Jeff King
2014-03-25 4:58 ` Junio C Hamano
2014-03-27 10:15 ` Ilya Bobyr
2014-03-27 10:32 ` [RFC/PATCH v2] " Ilya Bobyr
2014-03-27 10:32 ` [PATCH 1/3] test-lib: Document short options in t/README Ilya Bobyr
2014-03-27 10:32 ` [PATCH 2/3] test-lib: tests skipped by GIT_SKIP_TESTS say so Ilya Bobyr
2014-03-27 10:32 ` [PATCH 3/3] test-lib: '--run' to run only specific tests Ilya Bobyr
2014-03-28 3:36 ` Eric Sunshine
2014-03-28 7:05 ` Ilya Bobyr
2014-03-30 9:41 ` Eric Sunshine
2014-03-31 17:09 ` Junio C Hamano
2014-03-31 19:35 ` David Tran
-- strict thread matches above, loose matches on Subject: below --
2014-04-22 8:19 [RFC/PATCH v3] Better control of the tests run by a test suite Ilya Bobyr
2014-04-22 8:19 ` [PATCH 1/3] test-lib: Document short options in t/README Ilya Bobyr
2014-04-23 18:24 ` Junio C Hamano
2014-04-30 9:38 ` Ilya Bobyr
2014-04-30 9:50 ` [RFC/PATCH v4] Better control of the tests run by a test suite Ilya Bobyr
2014-04-30 9:50 ` [PATCH 1/3] test-lib: Document short options in t/README Ilya Bobyr
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=xmqqvbuyb5po.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=ilya.bobyr@gmail$(echo .)com \
--cc=ramsay@ramsay1$(echo .)demon.co.uk \
--cc=sunshine@sunshineco$(echo .)com \
--cc=trast@inf$(echo .)ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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