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

Re: [PATCH 1/1][RFC][GSoC] submodule: using 'is_writing_gitmodules_ok()' for a stricter check

From
Shourya Shukla <shouryashukla.oo@gmail.com>
Date
Feb 13, 2020, 16:38 UTC
Message-ID
<20200213163819.6495-1-shouryashukla.oo@gmail.com>
In-Reply-To
<nycvar.QRO.7.76.6.2002131435301.46@tvgsbejvaqbjf.bet>
Hello Johannes,

I understand your point of view here. What I am trying to say is that we must update our .gitmodules if atleast the function 'is_writing_gitmodules_ok()' passes.

Before, we used to pass the if condition if our .gitmomdules existed and it did not matter if there were any traces of it in the index.

> But we're in the function called `update_path_in_gitmodules()` which
> suggests that we're working on an existing, valid `.gitmodules`.

But we still originally(before my patch) checked for the existence of .gitmodules right? The functions exits with error in case of absence of the file(which should happen).

> So I do not think that we can proceed if `.gitmodules` is absent from
> disk, even if in case that it is _also_ absent from the index and from the
> current branch.

Yes that is one case, but the other case is that _if_ the file exists, it **should** not exist in the index or our current branch(which must be necessary to ensure before making any updates to the file right?). This is the case which was not covered before but I have tried to cover it in my patch.

Is this explanation correct?

Regards, Shourya Shukla

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 4 of 5 in “[RFC][GSoC] submodule: enforcing stricter checks”
  1. 0/1 [RFC][GSoC] submodule: enforcing stricter checksShourya Shukla, Feb 11, 2020
  2. 1/1 [RFC][GSoC] submodule: using 'is_writing_gitmodules_ok()' for a stricter checkShourya Shukla, Feb 11, 2020
  3. Johannes SchindelinFeb 13, 2020
  4. Shourya ShuklaFeb 13, 2020
  5. Johannes SchindelinFeb 14, 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.