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, pclouds@gmail.com, j6t@kdbg.org
Subject: Re: [PATCH 0/2] Port `submodule init` to C
Date: Thu, 14 Apr 2016 11:26:31 -0700	[thread overview]
Message-ID: <xmqqwpo0f3mw.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1460657909-1329-1-git-send-email-sbeller@google.com> (Stefan Beller's message of "Thu, 14 Apr 2016 11:18:27 -0700")

Stefan Beller <sbeller@google.com> writes:

> * This applies on another base commit, such that we make use of the tests
>   written in origin/sb/submodule-path-misc-bugs. (I am not sure if I have too
>   many series in flight stomping on each other here)

I actually am quite sure that is the case ;-)

> * This time I actually fix what Ramsay was hinting at:
>   strbuf_detach(&sb, NULL) instead of strbuf_detach(&sb, 0);

Thanks, will take a look.

> Where do these patches apply?
> =============================
>
> I ran the following commands for a new starting point of this series:
>
>     git checkout --detach origin/sb/submodule-parallel-update
>     git merge origin/sb/submodule-helper-clone-regression-fix
>     git merge origin/sb/submodule-path-misc-bugs
>
> The second merge produces 2 conflicts, which can be resolved like this:
> (I am unsure about the second comment in strbuf.h though)
> diff --cc builtin/fetch.c
> index 5aa1c2d,e4639d8..0000000
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@@ -37,7 -37,8 +37,8 @@@ static int prune = -1; /* unspecified *
>   static int all, append, dry_run, force, keep, multiple, update_head_ok, verbosity;
>   static int progress = -1, recurse_submodules = RECURSE_SUBMODULES_DEFAULT;
>   static int tags = TAGS_DEFAULT, unshallow, update_shallow;
>  -static int max_children = 1;
>  +static int max_children = -1;
> + static enum transport_family family;
>   static const char *depth;
>   static const char *upload_pack;
>   static struct strbuf default_rla = STRBUF_INIT;
> diff --cc strbuf.h
> index d4f2aa1,f72fd14..0000000
> --- a/strbuf.h
> +++ b/strbuf.h
> @@@ -387,15 -387,10 +387,16 @@@ extern ssize_t strbuf_read_file(struct 
>   extern int strbuf_readlink(struct strbuf *sb, const char *path, size_t hint);
>   
>   /**
>  + * Write the whole content of the strbuf to the stream not stopping at
>  + * NUL bytes.
>  + */
>  +extern ssize_t strbuf_write(struct strbuf *sb, FILE *stream);
>  +
>  +/**
> -  * Read a line from a FILE *, overwriting the existing contents
> -  * of the strbuf. The second argument specifies the line
> -  * terminator character, typically `'\n'`.
> +  * Read a line from a FILE *, overwriting the existing contents of
> +  * the strbuf.  The strbuf_getline*() family of functions share
> +  * this signature, but have different line termination conventions.
> +  *
>    * Reading stops after the terminator or at EOF.  The terminator
>    * is removed from the buffer before returning.  Returns 0 unless
>    * there was nothing left before EOF, in which case it returns `EOF`.
>
> As sb/submodule-parallel-update and sb/submodule-helper-clone-regression-fix
> both touch builtin/submodule--helper.c, so we need those.
>
> We need origin/sb/submodule-path-misc-bugs as it tests `submodule add`
> output.
>
> Thanks,
> Stefan
>
> Stefan Beller (2):
>   submodule: port resolve_relative_url from shell to C
>   submodule: port init from shell to C
>
>  builtin/submodule--helper.c | 322 +++++++++++++++++++++++++++++++++++++++++++-
>  git-submodule.sh            | 127 +----------------
>  submodule.c                 |  21 +++
>  submodule.h                 |   1 +
>  t/t0060-path-utils.sh       |  43 ++++++
>  5 files changed, 392 insertions(+), 122 deletions(-)

      parent reply	other threads:[~2016-04-14 18:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 18:18 [PATCH 0/2] Port `submodule init` to C Stefan Beller
2016-04-14 18:18 ` [PATCH 1/2] submodule: port resolve_relative_url from shell " Stefan Beller
2016-04-14 19:35   ` Johannes Sixt
2016-04-14 19:37     ` Stefan Beller
2016-04-14 18:18 ` [PATCH 2/2] submodule: port init " Stefan Beller
2016-04-14 18:26 ` Junio C Hamano [this message]

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=xmqqwpo0f3mw.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=pclouds@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).