mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-15 00:22:19 +03:00
templater: drop support for open
template keyword
This commit is contained in:
parent
6320f24360
commit
91ee32b183
@ -140,7 +140,6 @@ fn config_colors(user_settings: &UserSettings) -> HashMap<String, String> {
|
||||
result.insert(String::from("hint"), String::from("blue"));
|
||||
|
||||
result.insert(String::from("commit_id"), String::from("blue"));
|
||||
result.insert(String::from("commit_id open"), String::from("green"));
|
||||
result.insert(String::from("change_id"), String::from("magenta"));
|
||||
result.insert(String::from("author"), String::from("yellow"));
|
||||
result.insert(String::from("author timestamp"), String::from("cyan"));
|
||||
@ -163,10 +162,6 @@ fn config_colors(user_settings: &UserSettings) -> HashMap<String, String> {
|
||||
String::from("working_copy commit_id"),
|
||||
String::from("bright blue"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("working_copy commit_id open"),
|
||||
String::from("bright green"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("working_copy change_id"),
|
||||
String::from("bright magenta"),
|
||||
|
@ -26,9 +26,8 @@ use crate::templater::{
|
||||
AuthorProperty, BranchProperty, ChangeIdProperty, CommitIdKeyword, CommitterProperty,
|
||||
ConditionalTemplate, ConflictProperty, ConstantTemplateProperty, DescriptionProperty,
|
||||
DivergentProperty, DynamicLabelTemplate, GitRefsProperty, IsGitHeadProperty,
|
||||
IsWorkingCopyProperty, LabelTemplate, ListTemplate, LiteralTemplate, OpenProperty,
|
||||
StringPropertyTemplate, TagProperty, Template, TemplateFunction, TemplateProperty,
|
||||
WorkingCopiesProperty,
|
||||
IsWorkingCopyProperty, LabelTemplate, ListTemplate, LiteralTemplate, StringPropertyTemplate,
|
||||
TagProperty, Template, TemplateFunction, TemplateProperty, WorkingCopiesProperty,
|
||||
};
|
||||
|
||||
#[derive(Parser)]
|
||||
@ -242,7 +241,6 @@ fn parse_commit_keyword<'a>(
|
||||
"commit_id" => Property::CommitId(Box::new(CommitIdKeyword)),
|
||||
"author" => Property::Signature(Box::new(AuthorProperty)),
|
||||
"committer" => Property::Signature(Box::new(CommitterProperty)),
|
||||
"open" => Property::Boolean(Box::new(OpenProperty)),
|
||||
"working_copies" => Property::String(Box::new(WorkingCopiesProperty { repo })),
|
||||
"current_working_copy" => Property::Boolean(Box::new(IsWorkingCopyProperty {
|
||||
repo,
|
||||
|
@ -196,14 +196,6 @@ impl TemplateProperty<Commit, Signature> for CommitterProperty {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct OpenProperty;
|
||||
|
||||
impl TemplateProperty<Commit, bool> for OpenProperty {
|
||||
fn extract(&self, context: &Commit) -> bool {
|
||||
context.is_open()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WorkingCopiesProperty<'a> {
|
||||
pub repo: RepoRef<'a>,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user