diff --git a/cli/src/commands/bookmark/list.rs b/cli/src/commands/bookmark/list.rs index fa3792673..918489079 100644 --- a/cli/src/commands/bookmark/list.rs +++ b/cli/src/commands/bookmark/list.rs @@ -196,7 +196,7 @@ pub fn cmd_bookmark_list( .any(|&(remote, _)| remote != git::REMOTE_NAME_FOR_LOCAL_GIT_REPO); } - if args.all_remotes || args.remotes.is_some() { + if !args.tracked && (args.all_remotes || args.remotes.is_some()) { for &(remote, remote_ref) in &untracked_remote_refs { let ref_name = RefName::remote_only(name, remote, remote_ref.target.clone()); template.format(&ref_name, formatter.as_mut())?; diff --git a/cli/tests/test_bookmark_command.rs b/cli/tests/test_bookmark_command.rs index 32e99c037..78b96de89 100644 --- a/cli/tests/test_bookmark_command.rs +++ b/cli/tests/test_bookmark_command.rs @@ -1819,7 +1819,6 @@ fn test_bookmark_list_tracked() { @origin: zwtyzrop c761c7ea (empty) remote-sync remote-unsync: nmzmmopx e1da745b (empty) local-only @origin (ahead by 1 commits, behind by 1 commits): qpsqxpyq 38ef8af7 (empty) remote-unsync - remote-untrack@origin: vmortlor 71a16b05 (empty) remote-untrack "# ); insta::assert_snapshot!(stderr, @r###"