git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Christian Couder" <chriscool@tuxfamily.org>,
	"SZEDER Gábor" <szeder@ira.uka.de>,
	git@vger.kernel.org
Subject: Re: [PATCH 3/3] bisect: check for mandatory argument of 'bisect replay'
Date: Thu, 14 Oct 2010 09:55:53 +0200	[thread overview]
Message-ID: <AANLkTi=HCHy0q4atzVYUGO0hQ3FBigZcFDsFLv9iZ=h-@mail.gmail.com> (raw)
In-Reply-To: <7viq16m0tk.fsf@alter.siamese.dyndns.org>

On Wed, Oct 13, 2010 at 7:58 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Christian Couder <chriscool@tuxfamily.org> writes:
>
>>> >  bisect_replay () {
>>> >
>>> > +  test "$#" -eq 1 || die "No logfile given"
>>> >
>>> >    test -r "$1" || die "cannot read $1 for replaying"
>>> >    bisect_reset
>>> >    while read git bisect command rev
>>>
>>> While at it perhaps you could do something like:
>>>
>>> bisect_replay () {
>>> +    test "$#" -lt 1 || die "No logfile given"
>>> +    test "$#" -gt 1 || die "Too many argument. Please give only one logfile."
>>>      test -r "$1" || die "cannot read $1 for replaying"
>>>      bisect_reset
>>>      while read git bisect command rev
>>
>> I mean:
>>
>> bisect_replay () {
>> +     test "$#" -lt 1 && die "No logfile given"
>> +     test "$#" -gt 1 && die "Too many argument. Please give only one logfile."
>>       test -r "$1" || die "cannot read $1 for replaying"
>>       bisect_reset
>>       while read git bisect command rev
>
> That suggests that the original patch is buggy as well, in that it says
> "No logfile given" when it gets two.
>
> How about checking with 1 and saying "Give me only one logfile" and be
> done with it?

Yeah or: "Give me exactly one logfile as argument"

Best regards,
Christian.

  reply	other threads:[~2010-10-14  7:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-10 21:48 [PATCH 1/3] bisect: improve error message of 'bisect log' while not bisecting SZEDER Gábor
2010-10-10 21:48 ` [PATCH 2/3] bisect: improve error msg of 'bisect reset' when original HEAD is deleted SZEDER Gábor
2010-10-10 21:48 ` [PATCH 3/3] bisect: check for mandatory argument of 'bisect replay' SZEDER Gábor
2010-10-12  2:35   ` Christian Couder
2010-10-12  2:56     ` Christian Couder
2010-10-13 17:58       ` Junio C Hamano
2010-10-14  7:55         ` Christian Couder [this message]
2010-10-11  6:44 ` [PATCH 1/3] bisect: improve error message of 'bisect log' while not bisecting Ævar Arnfjörð Bjarmason

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=HCHy0q4atzVYUGO0hQ3FBigZcFDsFLv9iZ=h-@mail.gmail.com' \
    --to=christian.couder@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=szeder@ira.uka.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).