git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: [PATCHv12 0/7] Expose submodule parallelism to the user
Date: Thu, 18 Feb 2016 15:20:42 -0800	[thread overview]
Message-ID: <xmqqio1lehbp.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAGZ79kZwgBJQ2bkvKSuT+ULiSPL9x5WTcwVJG0FATNv-D_-AhQ@mail.gmail.com> (Stefan Beller's message of "Thu, 18 Feb 2016 15:14:06 -0800")

Stefan Beller <sbeller@google.com> writes:

> On Thu, Feb 18, 2016 at 3:12 PM, Stefan Beller <sbeller@google.com> wrote:
>>> Unless you count "I want to write differently from what was
>>> suggested" is a desirable thing to do, I do not see a point in
>>> favouring the above that uses an extra variable and skip_prefix()
>>> over what I gave you as "how about" patch.  But whatever.
>>
>> The skip_prefix was there before, so it stuck there.

Sorry, but I thought this "parsing update strategy" was all new
code.

>> Also it seems a bit more high level to me hence easier to read,
>> (though I am biased). I'll use your suggestion.
>
> and it doesn't crash when passing in value == NULL.
> (We don't do that currently, just a side observation)

Hmph.  If you pass str==NULL with prefix="!" to what we have below,
I would think the first iteration would try to read from *str and do
a bizarre thing.

static inline int skip_prefix(const char *str, const char *prefix,
			      const char **out)
{
	do {
		if (!*prefix) {
			*out = str;
			return 1;
		}
	} while (*str++ == *prefix++);
	return 0;
}

Puzzled.

  reply	other threads:[~2016-02-18 23:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 22:19 [PATCHv12 0/7] Expose submodule parallelism to the user Stefan Beller
2016-02-18 22:19 ` [PATCHv12 1/7] submodule-config: keep update strategy around Stefan Beller
2016-02-18 22:19 ` [PATCHv12 2/7] submodule-config: drop check against NULL Stefan Beller
2016-02-18 22:19 ` [PATCHv12 3/7] fetching submodules: respect `submodule.fetchJobs` config option Stefan Beller
2016-02-18 22:19 ` [PATCHv12 4/7] submodule update: direct error message to stderr Stefan Beller
2016-02-18 22:19 ` [PATCHv12 5/7] git submodule update: have a dedicated helper for cloning Stefan Beller
2016-02-18 22:19 ` [PATCHv12 6/7] submodule update: expose parallelism to the user Stefan Beller
2016-02-18 22:19 ` [PATCHv12 7/7] clone: allow an explicit argument for parallel submodule clones Stefan Beller
2016-02-18 22:55 ` [PATCHv12 0/7] Expose submodule parallelism to the user Junio C Hamano
2016-02-18 23:12   ` Stefan Beller
2016-02-18 23:14     ` Stefan Beller
2016-02-18 23:20       ` Junio C Hamano [this message]
2016-02-18 23:27         ` Stefan Beller
2016-02-19  3:14           ` Junio C Hamano

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=xmqqio1lehbp.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=sbeller@google.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.
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).