We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 440cdd3 commit ef3e1beCopy full SHA for ef3e1be
src/features/hyperlinks.rs
@@ -32,8 +32,10 @@ pub fn remote_from_config(cfg: &Option<&GitConfig>) -> Option<GitRemoteRepo> {
32
}
33
34
lazy_static! {
35
- // note: pure numbers are filtered out later again
36
- static ref COMMIT_HASH_REGEX: Regex = Regex::new(r"\b[0-9a-f]{8,40}\b").unwrap();
+ // Commit hashes can be abbreviated to 7 characters, these necessarily become longer
+ // when more objects are in a repository.
37
+ // Note: pure numbers are filtered out later again.
38
+ static ref COMMIT_HASH_REGEX: Regex = Regex::new(r"\b[0-9a-f]{7,40}\b").unwrap();
39
40
41
pub fn format_commit_line_with_osc8_commit_hyperlink<'a>(
0 commit comments