Skip to content

Commit c9f1ef6

Browse files
committed
hook: Ignore updates to remote branches in reference-transaction
1 parent b549f72 commit c9f1ef6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

git-branchless-hook/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,12 @@ fn hook_reference_transaction(effects: &Effects, transaction_state: &str) -> eyr
456456
ref_name,
457457
old_oid: _,
458458
new_oid: _,
459-
}| !should_ignore_ref_updates(ref_name),
459+
}| {
460+
!should_ignore_ref_updates(ref_name)
461+
&& !CategorizedReferenceName::new(ref_name)
462+
.friendly_describe()
463+
.starts_with("remote")
464+
},
460465
)
461466
.map(|parsed_line| fix_packed_reference_oid(&repo, &packed_references, parsed_line))
462467
.collect();

0 commit comments

Comments
 (0)