Re: [PATCH 2/5] submodule_move_head: prepare env for child correctly

2 messages, 2 authors, 2017-05-02 · open the first message on its own page

Re: [PATCH 2/5] submodule_move_head: prepare env for child correctly

From: Junio C Hamano <hidden>
Date: 2017-05-02 02:04:14

Stefan Beller [off-list ref] writes:
We forgot to prepare the submodule env, which is only a problem for
nested submodules. See 2e5d6503bd (ls-files: fix recurse-submodules
with nested submodules, 2017-04-13) for further explanation.

Signed-off-by: Stefan Beller <redacted>
---
Sounds good (if only because this makes it similar to other
codepaths).

Is this something whose breakage before the patch is easily
demonstrated with a test?
quoted hunk
 submodule.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/submodule.c b/submodule.c
index cd098cf12b..c7a7a33916 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1476,6 +1476,7 @@ int submodule_move_head(const char *path,
 			cp.no_stdin = 1;
 			cp.dir = path;
 
+			prepare_submodule_repo_env(&cp.env_array);
 			argv_array_pushl(&cp.args, "update-ref", "HEAD", new, NULL);
 
 			if (run_command(&cp)) {

Re: [PATCH 2/5] submodule_move_head: prepare env for child correctly

From: Stefan Beller <hidden>
Date: 2017-05-02 04:19:01

On Mon, May 1, 2017 at 7:04 PM, Junio C Hamano [off-list ref] wrote:
Stefan Beller [off-list ref] writes:
quoted
We forgot to prepare the submodule env, which is only a problem for
nested submodules. See 2e5d6503bd (ls-files: fix recurse-submodules
with nested submodules, 2017-04-13) for further explanation.

Signed-off-by: Stefan Beller <redacted>
---
Sounds good (if only because this makes it similar to other
codepaths).

Is this something whose breakage before the patch is easily
demonstrated with a test?
I'll try to come up with a test in a reroll.

Thanks,
Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help