Skip to content

Commit 08455de

Browse files
committed
use match
1 parent a439e69 commit 08455de

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

git-branchless-hook/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,11 @@ fn hook_reference_transaction(effects: &Effects, transaction_state: &str) -> eyr
458458
new_oid: _,
459459
}| {
460460
!should_ignore_ref_updates(ref_name)
461-
&& !CategorizedReferenceName::new(ref_name)
462-
.friendly_describe()
463-
.starts_with("remote")
461+
&& match CategorizedReferenceName::new(ref_name) {
462+
CategorizedReferenceName::RemoteBranch { .. } => false,
463+
CategorizedReferenceName::OtherRef { .. } => false,
464+
CategorizedReferenceName::LocalBranch { .. } => true,
465+
}
464466
},
465467
)
466468
.map(|parsed_line| fix_packed_reference_oid(&repo, &packed_references, parsed_line))

0 commit comments

Comments
 (0)