When using git-mv with a submodule it will detect that and update the
paths for its configurations (.gitmodules, worktree and gitfile). This
does not work for nested submodules where a user renames the root
submodule.
We discovered this fact when working on on-demand fetch for renamed
submodules. Lets add a test to document.
Signed-off-by: Heiko Voigt <redacted>
---
t/t7001-mv.sh | 9 +++++++++
1 file changed, 9 insertions(+)
From: Stefan Beller <hidden> Date: 2017-08-17 19:06:02
On Thu, Aug 17, 2017 at 3:34 AM, Heiko Voigt [off-list ref] wrote:
quoted hunk
When using git-mv with a submodule it will detect that and update the
paths for its configurations (.gitmodules, worktree and gitfile). This
does not work for nested submodules where a user renames the root
submodule.
We discovered this fact when working on on-demand fetch for renamed
submodules. Lets add a test to document.
Signed-off-by: Heiko Voigt <redacted>
---
t/t7001-mv.sh | 9 +++++++++
1 file changed, 9 insertions(+)
@@ -491,4 +491,13 @@ test_expect_success 'moving a submodule in nested directories' 'test_cmpactualexpect'+test_expect_failure'moving nested submodules''+gitcommit-am"cleanup commit"&&+gitsubmoduleadd./.sub_nested&&
If possible, I would avoid adding the repo itself
as a submodule as it is unrealistic in the wild.
While it may be ok for the test here, later down the road
other tests making use of it it may become an issue with
the URL of the submodule.
On Thu, Aug 17, 2017 at 12:05:56PM -0700, Stefan Beller wrote:
On Thu, Aug 17, 2017 at 3:34 AM, Heiko Voigt [off-list ref] wrote:
quoted
When using git-mv with a submodule it will detect that and update the
paths for its configurations (.gitmodules, worktree and gitfile). This
does not work for nested submodules where a user renames the root
submodule.
We discovered this fact when working on on-demand fetch for renamed
submodules. Lets add a test to document.
Signed-off-by: Heiko Voigt <redacted>
---
t/t7001-mv.sh | 9 +++++++++
1 file changed, 9 insertions(+)
@@ -491,4 +491,13 @@ test_expect_success 'moving a submodule in nested directories' 'test_cmpactualexpect'+test_expect_failure'moving nested submodules''+gitcommit-am"cleanup commit"&&+gitsubmoduleadd./.sub_nested&&
If possible, I would avoid adding the repo itself
as a submodule as it is unrealistic in the wild.
While it may be ok for the test here, later down the road
other tests making use of it it may become an issue with
the URL of the submodule.
I just copied the shortcut that they were adding themselfes as submodule
in 'setup submodule'. The whole setup of submodules in this test is like
this. This way we already had a nested submodule structure which I could
just add.
I agree that this is unrealistic so I can change that in the test I am
adding. But from what I have seen, this shortcut is taken in quite some
places when dealing with submodules.
Cheers Heiko
From: Stefan Beller <hidden> Date: 2017-08-18 19:04:09
I just copied the shortcut that they were adding themselfes as submodule
in 'setup submodule'. The whole setup of submodules in this test is like
this. This way we already had a nested submodule structure which I could
just add.
I agree that this is unrealistic so I can change that in the test I am
adding. But from what I have seen, this shortcut is taken in quite some
places when dealing with submodules.
Please do not make it worse.
Once upon a time (late '16 IIRC) I had a series floating on the
list removing all occurrences, but there were issues with the
series and it did not land.
When using git-mv with a submodule it will detect that and update the
paths for its configurations (.gitmodules, worktree and gitfile). This
does not work for recursive submodules where a user renames the root
submodule.
We discovered this fact when working on on-demand fetch for renamed
submodules. Lets add a test to document.
Signed-off-by: Heiko Voigt <redacted>
---
On Fri, Aug 18, 2017 at 12:04:03PM -0700, Stefan Beller wrote:
quoted
I just copied the shortcut that they were adding themselfes as submodule
in 'setup submodule'. The whole setup of submodules in this test is like
this. This way we already had a nested submodule structure which I could
just add.
I agree that this is unrealistic so I can change that in the test I am
adding. But from what I have seen, this shortcut is taken in quite some
places when dealing with submodules.
Please do not make it worse.
Once upon a time (late '16 IIRC) I had a series floating on the
list removing all occurrences, but there were issues with the
series and it did not land.
Took a little while but here is a more clean patch creating individual
submodules for the nesting.
Cheers Heiko
t/t7001-mv.sh | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)