ok/jj
1
0
Fork 0
forked from mirrors/jj

templater: include pseudo @git targets in branches keyword

#1666
This commit is contained in:
Yuya Nishihara 2023-07-08 01:49:28 +09:00
parent 2c3dd99f17
commit d58702cd63
3 changed files with 7 additions and 6 deletions

View file

@ -110,9 +110,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
setting the `revsets.short-prefixes` config to a different revset.
* The last seen state of branches in the underlying git repo is now presented by
`jj branch list` as a remote called `git` (e.g. `main@git`). They can also be
referenced in revsets. Such branches exist in colocated repos or if you use
`jj git export`.
`jj branch list`/`jj log` as a remote called `git` (e.g. `main@git`). They can
also be referenced in revsets. Such branches exist in colocated repos or if
you use `jj git export`.
* The new `jj chmod` command allows setting or removing the executable bit on
paths. Unlike the POSIX `chmod`, it works on Windows, on conflicted files, and

View file

@ -24,7 +24,7 @@ use jujutsu_lib::hex_util::to_reverse_hex;
use jujutsu_lib::id_prefix::IdPrefixContext;
use jujutsu_lib::op_store::{RefTarget, WorkspaceId};
use jujutsu_lib::repo::Repo;
use jujutsu_lib::rewrite;
use jujutsu_lib::{git, rewrite};
use once_cell::unsync::OnceCell;
use crate::formatter::Formatter;
@ -352,7 +352,8 @@ impl RefNamesIndex {
fn build_branches_index(repo: &dyn Repo) -> RefNamesIndex {
let mut index = RefNamesIndex::default();
for (branch_name, branch_target) in repo.view().branches() {
let (all_branches, _) = git::build_unified_branches_map(repo.view());
for (branch_name, branch_target) in &all_branches {
let local_target = branch_target.local_target.as_ref();
let mut unsynced_remote_targets = branch_target
.remote_targets

View file

@ -250,7 +250,7 @@ fn test_branch_forget_export() {
"###);
let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-r=foo@git", "--no-graph"]);
insta::assert_snapshot!(stdout, @r###"
rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:08.000 +07:00 65b6b74e0897
rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:08.000 +07:00 foo@git 65b6b74e0897
(empty) (no description set)
"###);