mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-06 18:32:14 +02:00
filter-repo: make sure git-fast-import has really finished when we exit
Also, provide an OutputStream class, to make it easy to still direct all output to some file rather than always sending to git fast-import. Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
2581e7a0e6
commit
e4a4787393
@ -347,7 +347,7 @@ class FastExportFilter(object):
|
||||
def FastExportOutput(source_repo, extra_args = []):
|
||||
return Popen(["git", "fast-export", "--all", "--topo-order"] + extra_args,
|
||||
stdout = PIPE,
|
||||
cwd = source_repo).stdout
|
||||
cwd = source_repo)
|
||||
|
||||
def FastImportInput(target_repo, extra_args = []):
|
||||
if not os.path.isdir(target_repo):
|
||||
@ -356,7 +356,7 @@ def FastImportInput(target_repo, extra_args = []):
|
||||
raise SystemExit("git init in %s failed!" % target_repo)
|
||||
return Popen(["git", "fast-import", "--quiet"] + extra_args,
|
||||
stdin = PIPE,
|
||||
cwd = target_repo).stdin
|
||||
cwd = target_repo)
|
||||
|
||||
def get_total_commits(repo):
|
||||
p1 = Popen(["git", "rev-list", "--all"], stdout = PIPE, cwd = repo)
|
||||
|
Loading…
Reference in New Issue
Block a user