All of lore.kernel.org
 help / color / mirror / Atom feed
From: Atharva Raykar <raykar.ath@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Christian Couder <christian.couder@gmail.com>,
	Shourya Shukla <shouryashukla.oo@gmail.com>,
	Prathamesh Chavan <pc44800@gmail.com>
Subject: Re: [PATCH v3] [GSoC] submodule--helper: introduce add-clone subcommand
Date: Fri, 4 Jun 2021 16:46:06 +0530	[thread overview]
Message-ID: <97DA3479-7E78-4EC8-BBD0-72869803E9D0@gmail.com> (raw)
In-Reply-To: <20210604110524.84326-1-raykar.ath@gmail.com>

On 04-Jun-2021, at 16:35, Atharva Raykar <raykar.ath@gmail.com> wrote:
> 
> Let's add a new "add-clone" subcommand to `git submodule--helper` with
> the goal of converting part of the shell code in git-submodule.sh
> related to `git submodule add` into C code. This new subcommand clones
> the repository that is to be added, and checks out to the appropriate
> branch.
> 
> This is meant to be a faithful conversion that leaves the behaviour of
> 'submodule add' unchanged. The only minor change is that if a submodule name has
> been supplied with a name that clashes with a local submodule, the message shown
> to the user ("A git directory for 'foo' is found locally...") is prepended with
> "error" for clarity.
> 
> This is part of a series of changes that will result in all of 'submodule add'
> being converted to C.
> 
> Signed-off-by: Atharva Raykar <raykar.ath@gmail.com>
> Mentored-by: Christian Couder <christian.couder@gmail.com>
> Mentored-by: Shourya Shukla <shouryashukla.oo@gmail.com>
> Based-on-patch-by: Shourya Shukla <shouryashukla.oo@gmail.com>
> Based-on-patch-by: Prathamesh Chavan <pc44800@gmail.com>
> ---
> 
> Changes since v2:
> * Remove printf debug statement that was accidentally inserted into the final
>   patch
> * Rename 'struct add_data info' to the more descriptive
>   'struct add_data add_data'
> * Remove unnecessary variables while parsing flags, and insert into the struct
>   members directly
> * Eliminate extra heap allocation via 'xstrndup()' in parse_token()
>   (I learnt this trick from Junio's comment on Shourya's v2 review of a similar
>   patch :^) )

I forgot to mention, but this patch can be fetched via GitHub from:

https://github.com/tfidfwastaken/git/tree/submodule-add-in-c-add-clone-v3

  reply	other threads:[~2021-06-04 11:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28  8:12 [PATCH][GSoC] submodule: introduce add-clone helper for submodule add Atharva Raykar
2021-06-01 22:10 ` Christian Couder
2021-06-02  7:55   ` Atharva Raykar
2021-06-02  8:18     ` Atharva Raykar
2021-06-02 13:12 ` [PATCH v2] [GSoC] submodule--helper: introduce add-clone subcommand Atharva Raykar
2021-06-04  8:21   ` Christian Couder
2021-06-04  9:47     ` Atharva Raykar
2021-06-04 11:05       ` [PATCH v3] " Atharva Raykar
2021-06-04 11:16         ` Atharva Raykar [this message]
2021-06-04 11:37   ` [PATCH v2] " Shourya Shukla
2021-06-04 12:02     ` Atharva Raykar

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=97DA3479-7E78-4EC8-BBD0-72869803E9D0@gmail.com \
    --to=raykar.ath@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pc44800@gmail.com \
    --cc=shouryashukla.oo@gmail.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.