Skip to content

Commit bc5a2c0

Browse files
committed
use match
1 parent 10cbbe5 commit bc5a2c0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

git-branchless-hook/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,10 @@ 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 { name: _, prefix: _ } => false,
463+
_ => true,
464+
}
464465
},
465466
)
466467
.map(|parsed_line| fix_packed_reference_oid(&repo, &packed_references, parsed_line))

0 commit comments

Comments
 (0)