summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rwxr-xr-xbin/just-import-git.py17
-rw-r--r--share/man/just-import-git.1.org5
3 files changed, 25 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 06cc4f3c..1b9306a8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
A feature release on top of `1.1.0`, backwards compatible.
+### Other changes
+
+- `just-import-git` now supports an option `--plain` to import a
+ repository without dependencies.
+
## Release `1.1.0` (2023-05-19)
A feature release on top of `1.0.0`, backwards compatible.
diff --git a/bin/just-import-git.py b/bin/just-import-git.py
index 397c7a80..36b3d32b 100755
--- a/bin/just-import-git.py
+++ b/bin/just-import-git.py
@@ -230,8 +230,14 @@ def handle_import(args):
foreign_config_file = args.foreign_repository_config
else:
foreign_config_file = get_repository_config_file(srcdir)
- with open(foreign_config_file) as f:
- foreign_config = json.load(f)
+ if args.plain:
+ foreign_config = { "main": "",
+ "repositories": {"": {"repository":
+ {"type": "file",
+ "path": "." }}}}
+ else:
+ with open(foreign_config_file) as f:
+ foreign_config = json.load(f)
foreign_repos = foreign_config.get("repositories", {})
if args.foreign_repository_name:
foreign_name = args.foreign_repository_name
@@ -294,6 +300,13 @@ def main():
metavar="relative-path"
)
parser.add_argument(
+ "--plain",
+ action="store_true",
+ help=
+ "Pretend the remote repository description is the canonical"
+ + " single-repository one",
+ )
+ parser.add_argument(
"--as",
dest="import_as",
help="Name prefix to import the foreign repository as",
diff --git a/share/man/just-import-git.1.org b/share/man/just-import-git.1.org
index c2d5c6f9..26d05ea3 100644
--- a/share/man/just-import-git.1.org
+++ b/share/man/just-import-git.1.org
@@ -75,6 +75,11 @@ The resulting configuration is printed on standard output.
and ~"system"~). In other words, ~repos.json~ and ~etc/repos.json~
are tried if this option is not given.
+ *--plain* \\
+ Pretend the foreign multi-repository specification is the
+ canonical one for a single repository. Useful, if the repository
+ to be imported does not have a repository configuration or
+ should be imported without dependencies.
* See also