fix: remote tracking branch configuration config

Previously, the function always used 'origin' as the remote name.
The command now dynamically uses the provided remote name, ensuring proper configuration for non-origin remotes.

Signed-off-by: xbj110825 <xbj1108_25@126.com>
pull/83587/head
xbj110825 4 months ago
parent c668294f04
commit cd4d6e838d
No known key found for this signature in database
GPG Key ID: E05B2E07109AB70E

@ -1031,7 +1031,7 @@ def fix_remote_tracking_branch(git_path, module, dest, remote, version, single_b
else:
fetch_ref = '+refs/heads/*:refs/remotes/origin/*'
cmd = [git_path, 'config', 'remote.origin.fetch', fetch_ref]
cmd = [git_path, 'config', 'remote.%s.fetch' % remote, fetch_ref]
(rc, out, err) = module.run_command(cmd, cwd=dest)
if rc != 0:
module.fail_json(

Loading…
Cancel
Save