git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC][PATCH 0/2] submodule: port 'set-url' from shell to C

From
Shourya Shukla <shouryashukla.oo@gmail.com>
Date
Apr 27, 2020, 07:19 UTC
Message-ID
<20200427071920.GA23846@konoha>
In-Reply-To
<20200420081902.GA202848@generichostname>
On 20/04 04:19, Denton Liu wrote:
Show 6 quoted lines
> > 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().

I have implemented this, yet running the test still gives an error. The function 'init_pathspec_item' in 'pathspec.c' tends to fail. Going further deep, the function 'prefix_path_gently' fails. I think this is happening because of the relative path outside the superproject for '../newsubmodule' and hence it throws a problem with prefixing.

The exact function responsible here is 'normalize_path_copy' in 'path.c'.

On doing '-i -v' while running the test. The problem comes down to:
fatal: ../newsubmodule: '../newsubmodule' is outside repository at '<path>/git/t/trash directory.t7420-submodule-set-url/super'

What exactly is wrong here and how should this problem and similar ones (if encountered) be approached? Do we follow certain procedures when debugging problems at such an intricate level?

Regards, Shourya Shukla

Previous: Denton LiuNext: Denton Liu
Message 7 of 8 in “submodule: port 'set-url' from shell to C”
  1. Shourya ShuklaApr 16, 2020
  2. 1/2 submodule.c: update URL in .gitmodules using update_url_in_gitmodulesShourya Shukla, Apr 16, 2020
  3. 2/2 submodule: port subcommand 'set-url' from shell to CShourya Shukla, Apr 16, 2020
  4. Christian CouderApr 17, 2020
  5. Christian CouderApr 17, 2020
  6. Denton LiuApr 20, 2020
  7. Shourya ShuklaApr 27, 2020
  8. Denton LiuApr 27, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.