Re: [PATCH v3 8/9] read-tree: add "--super-prefix" option, eliminate global
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 9 quoted lines
> @@ -2149,7 +2140,7 @@ int submodule_move_head(const char *path,
> strbuf_release(&gitdir);
>
> /* make sure the index is clean as well */
> - submodule_reset_index(path);
> + submodule_reset_index(path, NULL);
> }
>
> if (old_head && (flags & SUBMODULE_MOVE_HEAD_FORCE)) {Show 9 quoted lines
> @@ -312,7 +314,7 @@ static int check_submodule_move_head(const struct cache_entry *ce,
> if (o->reset)
> flags |= SUBMODULE_MOVE_HEAD_FORCE;
>
> - if (submodule_move_head(ce->name, old_id, new_id, flags))
> + if (submodule_move_head(ce->name, NULL, old_id, new_id, flags))
> return add_rejected_path(o, ERROR_WOULD_LOSE_SUBMODULE, ce->name);
> return 0;
> }
here I think we should be passing a non-NULL value to super_prefix.
Perhaps this was missed when going through the v2 feedback [1]?
[1] https://lore.kernel.org/git/kl6lv8nhnpba.fsf@chooglen-macbookpro.roam.corp.google.com