mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-01 09:08:51 +00:00
cli: bookmark list: fix --tracked --remote to not include untracked refs
Different filter options should intersect. The doc also says --tracked "shows remote tracked bookmarks only."
This commit is contained in:
parent
fc3e99d0e9
commit
c93d97d00b
2 changed files with 1 additions and 2 deletions
|
@ -196,7 +196,7 @@ pub fn cmd_bookmark_list(
|
||||||
.any(|&(remote, _)| remote != git::REMOTE_NAME_FOR_LOCAL_GIT_REPO);
|
.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 {
|
for &(remote, remote_ref) in &untracked_remote_refs {
|
||||||
let ref_name = RefName::remote_only(name, remote, remote_ref.target.clone());
|
let ref_name = RefName::remote_only(name, remote, remote_ref.target.clone());
|
||||||
template.format(&ref_name, formatter.as_mut())?;
|
template.format(&ref_name, formatter.as_mut())?;
|
||||||
|
|
|
@ -1819,7 +1819,6 @@ fn test_bookmark_list_tracked() {
|
||||||
@origin: zwtyzrop c761c7ea (empty) remote-sync
|
@origin: zwtyzrop c761c7ea (empty) remote-sync
|
||||||
remote-unsync: nmzmmopx e1da745b (empty) local-only
|
remote-unsync: nmzmmopx e1da745b (empty) local-only
|
||||||
@origin (ahead by 1 commits, behind by 1 commits): qpsqxpyq 38ef8af7 (empty) remote-unsync
|
@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###"
|
insta::assert_snapshot!(stderr, @r###"
|
||||||
|
|
Loading…
Reference in a new issue