Skip to content

Commit 5c00880

Browse files
committed
cmd/git(fix[remote.add]): Wire fetch, track, and master parameters
why: GitRemoteManager.add() exposed fetch, track, master parameters in the signature but they were never translated to CLI flags. Callers would get silent no-ops when using these options. what: - Wire fetch to -f flag - Wire track to -t <branch> - Wire master to -m <master>
1 parent ece0d80 commit 5c00880

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/libvcs/cmd/git.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4255,6 +4255,12 @@ def add(
42554255
local_flags: list[str] = []
42564256
required_flags: list[str] = [name, url]
42574257

4258+
if fetch is True:
4259+
local_flags.append("-f")
4260+
if track is not None:
4261+
local_flags.extend(["-t", track])
4262+
if master is not None:
4263+
local_flags.extend(["-m", master])
42584264
if mirror is not None:
42594265
if isinstance(mirror, str):
42604266
assert any(f for f in ["push", "fetch"])

0 commit comments

Comments
 (0)