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