From: Paolo Bonzini <paolo.bonzini@gmail•com>
To: Johannes Schindelin <Johannes.Schindelin@gmx•de>
Cc: Git mailing list <git@vger•kernel.org>
Subject: Re: [PATCH] make commit --interactive lock index
Date: Thu, 29 May 2008 15:12:56 +0200 [thread overview]
Message-ID: <483EABD8.3050600@gnu.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0805291343120.13507@racer.site.net>
Johannes Schindelin wrote:
> Hi,
>
> On Thu, 29 May 2008, Paolo Bonzini wrote:
>
>> @@ -233,6 +228,8 @@ static char *prepare_index(int argc, const char **argv, const char *prefix)
>> if (*argv)
>> pathspec = get_pathspec(prefix, argv);
>>
>> + assert (!(interactive && pathspec && *pathspec));
>
> As pathspec is specified indirectly by the user, I think an assert() here
> is actively wrong.
But the program may still guarantee a condition by checking it
elsewhere. I don't need to teach you about that, do I? In particular,
the assert checks that this:
if (interactive && argc > 0)
die("Paths with --interactive does not make sense.");
... is equivalent to !pathspec || !*pathspec.
Paolo
next prev parent reply other threads:[~2008-05-29 13:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 8:09 [PATCH] make commit --interactive lock index Paolo Bonzini
2008-05-29 12:43 ` Johannes Schindelin
2008-05-29 13:12 ` Paolo Bonzini [this message]
2008-05-29 13:55 ` Johannes Schindelin
2008-05-29 14:40 ` Paolo Bonzini
2008-05-29 17:51 ` Alex Riesen
2008-05-29 18:00 ` Paolo Bonzini
2008-05-29 18:56 ` Alex Riesen
2008-05-29 19:17 ` Paolo Bonzini
2008-05-30 5:29 ` Junio C Hamano
2008-05-30 7:42 ` Paolo Bonzini
2008-06-02 13:52 ` Paolo Bonzini
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=483EABD8.3050600@gnu.org \
--to=paolo.bonzini@gmail$(echo .)com \
--cc=Johannes.Schindelin@gmx$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
/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