Skip to content

Commit

Permalink
fix redaction
Browse files Browse the repository at this point in the history
  • Loading branch information
terminalmage committed Aug 28, 2015
1 parent 399871e commit 07db5a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion salt/modules/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ def remote_set(cwd, name='origin', url=None, user=None, https_user=None,
https_only=True)
except ValueError as exc:
raise SaltInvocationError(exc.__str__())
cmd = 'git remote add {0} {1}'.format(name, url)
cmd = 'git remote add {0} \'{1}\''.format(name, url)
_git_run(cmd, cwd=cwd, runas=user)
return remote_get(cwd=cwd, remote=name, user=None)

Expand Down
7 changes: 5 additions & 2 deletions salt/states/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,15 @@ def latest(name,
if remote is None or remote[0] != desired_fetch_url:
__salt__['git.remote_set'](target,
name=remote_name,
url=desired_fetch_url,
url=name,
user=user,
https_user=https_user,
https_pass=https_pass)
ret['changes']['remote/{0}'.format(remote_name)] = (
"{0} => {1}".format(str(remote), redacted_fetch_url)
"{0} => {1}".format(
salt.utils.url.redact_http_basic_auth(str(remote)),
redacted_fetch_url
)
)
# Set to fetch later since we just added the remote and
# need to get the refs
Expand Down

0 comments on commit 07db5a7

Please sign in to comment.