|
9 | 9 | importos |
10 | 10 | importre |
11 | 11 | importwarnings |
12 | | -fromurllib.parseimporturlsplit, urlunsplit |
13 | 12 |
|
14 | 13 | fromgit.cmdimport ( |
15 | 14 | Git, |
|
27 | 26 | fromgit.objectsimportSubmodule, RootModule, Commit |
28 | 27 | fromgit.refsimportHEAD, Head, Reference, TagReference |
29 | 28 | fromgit.remoteimportRemote, add_progress, to_progress_instance |
30 | | -fromgit.utilimportActor, finalize_process, decygpath, hex_to_bin, expand_path |
| 29 | +fromgit.utilimportActor, finalize_process, decygpath, hex_to_bin, expand_path, remove_password_if_present |
31 | 30 | importos.pathasosp |
32 | 31 |
|
33 | 32 | from .funimportrev_parse, is_git_dir, find_submodule_git_dir, touch, find_worktree_git_dir |
@@ -971,16 +970,8 @@ def _clone(cls, git, url, path, odb_default_type, progress, multi_options=None, |
971 | 970 | else: |
972 | 971 | (stdout, stderr) =proc.communicate() |
973 | 972 | cmdline=getattr(proc, 'args', '') |
974 | | -uri=cmdline[-2] |
975 | | -try: |
976 | | -url=urlsplit(uri) |
977 | | -# Remove password from the URL if present |
978 | | -ifurl.password: |
979 | | -edited_url=url._replace( |
980 | | -netloc=url.netloc.replace(url.password, "****")) |
981 | | -cmdline[-2] =urlunsplit(edited_url) |
982 | | -exceptValueError: |
983 | | -log.debug("Unable to parse the URL %s", url) |
| 973 | +cmdline=remove_password_if_present(cmdline) |
| 974 | + |
984 | 975 | log.debug("Cmd(%s)'s unused stdout: %s", cmdline, stdout) |
985 | 976 | finalize_process(proc, stderr=stderr) |
986 | 977 |
|
|
0 commit comments