summaryrefslogtreecommitdiff
path: root/bin/just-import-git.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/just-import-git.py')
-rwxr-xr-xbin/just-import-git.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/just-import-git.py b/bin/just-import-git.py
index 4a070445..b75deb5c 100755
--- a/bin/just-import-git.py
+++ b/bin/just-import-git.py
@@ -268,9 +268,18 @@ def rewrite_repo(repo_spec: Json,
repo = assign[repo]
elif repo.get("type") == "file":
changes = {}
+ # take subdir
subdir: str = os.path.normpath(repo.get("path", "."))
if subdir != ".":
changes["subdir"] = subdir
+ # keep ignore special and absent pragmas
+ pragma = {}
+ if cast(Json, repo).get("pragma", {}).get("special", None) == "ignore":
+ pragma["special"] = "ignore"
+ if cast(Json, repo).get("pragma", {}).get("absent", False):
+ pragma["absent"] = True
+ if pragma:
+ changes["pragma"] = pragma
repo = dict(remote, **changes)
elif repo.get("type") == "distdir":
existing_repos: List[str] = repo.get("repositories", [])