Skip to content

Commit 516520c

Browse files
committed
cmd/git(fix[show]): Fix incorrect boolean condition for no_query_remotes
why: The condition `if no_query_remotes is not None or no_query_remotes:` incorrectly adds the -n flag when no_query_remotes=False, because `False is not None` evaluates to True. what: - Change condition to `if no_query_remotes:` in GitRemoteCmd.show() - Change condition to `if no_query_remotes:` in GitRemoteManager.show()
1 parent 239c790 commit 516520c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/libvcs/cmd/git.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3813,7 +3813,7 @@ def show(
38133813
if verbose is not None:
38143814
local_flags.append("--verbose")
38153815

3816-
if no_query_remotes is not None or no_query_remotes:
3816+
if no_query_remotes:
38173817
local_flags.append("-n")
38183818

38193819
return self.run(
@@ -4298,7 +4298,7 @@ def show(
42984298
if verbose is not None:
42994299
local_flags.append("--verbose")
43004300

4301-
if no_query_remotes is not None or no_query_remotes:
4301+
if no_query_remotes:
43024302
local_flags.append("-n")
43034303

43044304
return self.run(

0 commit comments

Comments
 (0)