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

cli: make jj branches indent remote branches and not repeat the branch name

Before:
```
git-comparison: de5aa1ac6c docs: add a table of git/jj command equivalences
git-comparison@origin: 15bbd1083b0e cli: add a table of git/jj command equivalences
main: 4aa1fd7cbb docs: move tutorial from README.md to docs/tutorial.md
```

After:
```
git-comparison: de5aa1ac6c docs: add a table of git/jj command equivalences
  @origin: 15bbd1083b0e cli: add a table of git/jj command equivalences
main: 4aa1fd7cbb docs: move tutorial from README.md to docs/tutorial.md
```
This commit is contained in:
Martin von Zweigbergk 2021-09-10 17:56:52 -07:00
parent 5023d8d360
commit 8b2db95897

View file

@ -2810,8 +2810,9 @@ fn cmd_branches(
if Some(remote_target) == branch_target.local_target.as_ref() {
continue;
}
write!(ui, " ")?;
ui.stdout_formatter().add_label("branch".to_string())?;
write!(ui, "{}@{}", name, remote)?;
write!(ui, "@{}", remote)?;
ui.stdout_formatter().remove_label()?;
print_branch_target(ui, Some(remote_target))?;
// TODO: Display information about remote branches, but probably