git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Denton Liu <liu.denton@gmail.com>
To: Shourya Shukla <shouryashukla.oo@gmail.com>
Cc: git@vger.kernel.org, christian.couder@gmail.com, peff@peff.net,
	heba.waly@gmail.com, Johannes.Schindelin@gmx.de,
	gitster@pobox.com
Subject: Re: [RFC][PATCH 0/2] submodule: port 'set-url' from shell to C
Date: Mon, 20 Apr 2020 04:19:02 -0400	[thread overview]
Message-ID: <20200420081902.GA202848@generichostname> (raw)
In-Reply-To: <20200416210456.19122-1-shouryashukla.oo@gmail.com>

Hi Shourya,

On Fri, Apr 17, 2020 at 02:34:54AM +0530, Shourya Shukla wrote:
> The issues I am facing are:
> 
> 1. The patch fails test #2 in t7420, i.e., the test to verify the working of 'set-url'
>    subcommand.

The 'set-url' command implicitly runs sync once it is changed. I would
go further than what Christian suggests and just call sync_submodule()
(in C) at the end of module_set_url().

> 2. Though not an issue affecting the patch, but the 'usage' prompt of 'git submodule'
>    does not show the subcommands 'set-url' and 'set-branch'.

Hmmm, the first of the pair, 'set-branch', was introduced in v2.22.0. It
seems like you're running an older version of Git, 2.20.1. Stupid
question but are you sure you're running the correct git? For me this
runs correctly on the latest 'master':

	$ ./bin-wrappers/git submodule -h
	usage: git submodule [--quiet] [--cached]
	   or: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
	   or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
	   or: git submodule [--quiet] init [--] [<path>...]
	   or: git submodule [--quiet] deinit [-f|--force] (--all| [--] <path>...)
	   or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--[no-]single-branch] [--] [<path>...]
	   or: git submodule [--quiet] set-branch (--default|--branch <branch>) [--] <path>
	   or: git submodule [--quiet] set-url [--] <path> <newurl>
	   or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
	   or: git submodule [--quiet] foreach [--recursive] <command>
	   or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
	   or: git submodule [--quiet] absorbgitdirs [--] [<path>...]

Thanks,

Denton

  parent reply	other threads:[~2020-04-20  8:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 21:04 [RFC][PATCH 0/2] submodule: port 'set-url' from shell to C Shourya Shukla
2020-04-16 21:04 ` [PATCH 1/2] submodule.c: update URL in .gitmodules using update_url_in_gitmodules Shourya Shukla
2020-04-16 21:04 ` [PATCH 2/2] submodule: port subcommand 'set-url' from shell to C Shourya Shukla
2020-04-17 22:13   ` Christian Couder
2020-04-17 22:09 ` [RFC][PATCH 0/2] submodule: port " Christian Couder
2020-04-20  8:19 ` Denton Liu [this message]
2020-04-27  7:19   ` Shourya Shukla
2020-04-27 10:17     ` Denton Liu

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=20200420081902.GA202848@generichostname \
    --to=liu.denton@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=heba.waly@gmail.com \
    --cc=peff@peff.net \
    --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.
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).