From acf93a80a9e1b07c9158220c22aef3fcb8a1dd11 Mon Sep 17 00:00:00 2001 From: Dave Townsend Date: Sat, 7 Dec 2019 10:21:26 -0800 Subject: [PATCH] Only export submodules that exist in the submodule mapping. --- hg-fast-export.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hg-fast-export.py b/hg-fast-export.py index ab9f60d..b7becbc 100755 --- a/hg-fast-export.py +++ b/hg-fast-export.py @@ -171,7 +171,8 @@ def refresh_gitmodules(ctx): gitmodules="" # Create the .gitmodules file and all submodules for name,subrepo_info in ctx.substate.items(): - gitmodules+=refresh_hg_submodule(name,subrepo_info) + if name in submodule_mappings: + gitmodules+=refresh_hg_submodule(name,subrepo_info) if len(gitmodules): wr('M 100644 inline .gitmodules')