Fix rebase-update on windows on git-svn repos.

Through a comedy of wrapper scripts, the ^ is being swallowed, which
causes the `git config` invocation to match all lines which HAVE
"remote" in them, instead of matching lines which BEGIN with remote.

R=maruel@chromium.org, pkasting@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1566343002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298185 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
iannucci@chromium.org
2016-01-09 08:08:41 +00:00
parent 105c85dbca
commit 0d9e59c6ce
2 changed files with 17 additions and 6 deletions

View File

@@ -49,9 +49,8 @@ def fetch_remotes(branch_tree):
remotes = set()
tag_set = git.tags()
fetchspec_map = {}
all_fetchspec_configs = git.run(
'config', '--get-regexp', r'^remote\..*\.fetch').strip()
for fetchspec_config in all_fetchspec_configs.splitlines():
all_fetchspec_configs = git.config_regexp(r'^remote\..*\.fetch')
for fetchspec_config in all_fetchspec_configs:
key, _, fetchspec = fetchspec_config.partition(' ')
dest_spec = fetchspec.partition(':')[2]
remote_name = key.split('.')[1]