mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-11-17 03:26:08 +00:00
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.
This commit is contained in:
parent
17772166cf
commit
8984ec4fef
@ -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