Skip to content

Commit 4d2d4f8

Browse files
committed
cmd/git(fix[run]): Remove invalid cached parameter from branch and stash
why: The cached parameter appended --cached to git branch and git stash commands, but neither command supports this option. Any caller using cached=True would get a CLI error. what: - Remove cached parameter from GitBranchCmd.run() - Remove cached parameter from GitBranchManager.run() - Remove cached parameter from GitStashCmd.run()
1 parent e45f18c commit 4d2d4f8

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/libvcs/cmd/git.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4773,7 +4773,6 @@ def run(
47734773
local_flags: list[str] | None = None,
47744774
*,
47754775
quiet: bool | None = None,
4776-
cached: bool | None = None, # Only when no command entered and status
47774776
# Pass-through to run()
47784777
log_in_real_time: bool = False,
47794778
check_returncode: bool | None = None,
@@ -4794,8 +4793,6 @@ def run(
47944793

47954794
if quiet is True:
47964795
local_flags.append("--quiet")
4797-
if cached is True:
4798-
local_flags.append("--cached")
47994796

48004797
return self.cmd.run(
48014798
["stash", *local_flags],
@@ -5318,7 +5315,6 @@ def run(
53185315
local_flags: list[str] | None = None,
53195316
*,
53205317
quiet: bool | None = None,
5321-
cached: bool | None = None,
53225318
# Pass-through to run()
53235319
log_in_real_time: bool = False,
53245320
check_returncode: bool | None = None,
@@ -5340,8 +5336,6 @@ def run(
53405336

53415337
if quiet is True:
53425338
local_flags.append("--quiet")
5343-
if cached is True:
5344-
local_flags.append("--cached")
53455339

53465340
return self.cmd.run(
53475341
["branch", *local_flags],
@@ -5627,7 +5621,6 @@ def run(
56275621
local_flags: list[str] | None = None,
56285622
*,
56295623
quiet: bool | None = None,
5630-
cached: bool | None = None,
56315624
# Pass-through to run()
56325625
log_in_real_time: bool = False,
56335626
check_returncode: bool | None = None,
@@ -5646,8 +5639,6 @@ def run(
56465639

56475640
if quiet is True:
56485641
local_flags.append("--quiet")
5649-
if cached is True:
5650-
local_flags.append("--cached")
56515642

56525643
return self.cmd.run(
56535644
["branch", *local_flags],

0 commit comments

Comments
 (0)