Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

templater: make branches, tags, git_refs, and git_head return list type #2437

Merged
merged 6 commits into from
Oct 27, 2023

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Oct 27, 2023

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

yuja added 6 commits October 27, 2023 14:31
I'm going to change list types to be implicitly cast to boolean. Exhaustive
match will prevent future bugs.
I'm going to change "branches" to return a list instead of formatted string,
and I don't think "if(branches, ..)" should be invalidated by that. Perhaps,
a container type like String, Vec<T>, Option<T> can implement the cast.
I think this is just a remainder of 65de7cb "`jj log`: Change conflicted
branches from `br?` to `br??`."
Both local and remote refs are backed by the same value type since we'll need
some kind of runtime abstraction to represent "branches" keyword (which is a
list of local + remote branches.) It's tedious to implement separate
local/remote/both ref types.

The "unsynced" flag is inverted just because the positive term is slightly
easier to document.
I'm not going to change the default output, but this allows us to highlight
or dim only the @Remote component.
@yuja yuja merged commit 817ca7f into jj-vcs:main Oct 27, 2023
14 checks passed
@yuja yuja deleted the push-zolnkrmluumw branch October 27, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants