git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] add test for bug in git-mv with nested submodules
@ 2017-08-17 10:34 Heiko Voigt
  2017-08-17 19:05 ` Stefan Beller
  0 siblings, 1 reply; 8+ messages in thread
From: Heiko Voigt @ 2017-08-17 10:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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 <hvoigt@hvoigt.net>
---
 t/t7001-mv.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index e365d1f..39f8aed 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -491,4 +491,13 @@ test_expect_success 'moving a submodule in nested directories' '
 	test_cmp actual expect
 '
 
+test_expect_failure 'moving nested submodules' '
+	git commit -am "cleanup commit" &&
+	git submodule add ./. sub_nested &&
+	git commit -m "add sub_nested" &&
+	git submodule update --init --recursive &&
+	git mv sub_nested sub_nested_moved &&
+	git status
+'
+
 test_done
-- 
2.0.0.274.g6b2cd91


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-09-20 13:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-17 10:34 [PATCH] add test for bug in git-mv with nested submodules Heiko Voigt
2017-08-17 19:05 ` Stefan Beller
2017-08-18 16:06   ` Heiko Voigt
2017-08-18 19:04     ` Stefan Beller
2017-09-15 11:50       ` [PATCH v2] add test for bug in git-mv for recursive submodules Heiko Voigt
2017-09-17  0:46         ` Junio C Hamano
2017-09-18 20:03           ` Stefan Beller
2017-09-20 13:46             ` Heiko Voigt

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).