Skip to content

Commit

Permalink
hook: Ignore updates to remote branches in reference-transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
pink committed Apr 21, 2023
1 parent b549f72 commit c9f1ef6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion git-branchless-hook/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,12 @@ fn hook_reference_transaction(effects: &Effects, transaction_state: &str) -> eyr
ref_name,
old_oid: _,
new_oid: _,
}| !should_ignore_ref_updates(ref_name),
}| {
!should_ignore_ref_updates(ref_name)
&& !CategorizedReferenceName::new(ref_name)
.friendly_describe()
.starts_with("remote")
},
)
.map(|parsed_line| fix_packed_reference_oid(&repo, &packed_references, parsed_line))
.collect();
Expand Down

0 comments on commit c9f1ef6

Please sign in to comment.