Use new git-ref API.
@@ -295,13 +295,14 @@ impl<'event> GitConfig<'event> {
}
}
if let Some(branch_name) = options.branch_name {
- if branch_name.category() == Some(git_ref::Category::LocalBranch) {
- let branch_name = branch_name.shorten();
+ if let Some((category, branch_name)) = branch_name.category_and_short_name() {
+ if category == git_ref::Category::LocalBranch {
if let Some(condition) = condition.strip_prefix("onbranch:") {
return condition == branch_name;
}
}
}
+ }
false
}
