summaryrefslogtreecommitdiff
path: root/git-remote-testgit.py
diff options
context:
space:
mode:
Diffstat (limited to 'git-remote-testgit.py')
-rw-r--r--git-remote-testgit.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/git-remote-testgit.py b/git-remote-testgit.py
index 0b5928d290..1ed7a5651e 100644
--- a/git-remote-testgit.py
+++ b/git-remote-testgit.py
@@ -120,8 +120,22 @@ def do_import(repo, args):
if not repo.gitdir:
die("Need gitdir to import")
+ ref = args[0]
+ refs = [ref]
+
+ while True:
+ line = sys.stdin.readline()
+ if line == '\n':
+ break
+ if not line.startswith('import '):
+ die("Expected import line.")
+
+ # strip of leading 'import '
+ ref = line[7:].strip()
+ refs.append(ref)
+
repo = update_local_repo(repo)
- repo.exporter.export_repo(repo.gitdir, args)
+ repo.exporter.export_repo(repo.gitdir, refs)
print "done"