diff options
author | nickelc <constantin.nickel@gmail.com> | 2023-03-09 11:15:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 05:15:04 -0500 |
commit | 6a37445efbe49bbcaff9b90ebdbf3d738b59badd (patch) | |
tree | e65f9920ed8194f1e9ce8a6fd3bedd2ff8212d64 /src/features | |
parent | b614b1cb1dddc42d5a1b6c4aa5f6e2665debb1d9 (diff) |
Add methods for getting `GitConfig` as reference (#1336)
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/hyperlinks.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/features/hyperlinks.rs b/src/features/hyperlinks.rs index 841c7518..4747c131 100644 --- a/src/features/hyperlinks.rs +++ b/src/features/hyperlinks.rs @@ -32,11 +32,7 @@ pub fn format_commit_line_with_osc8_commit_hyperlink<'a>( format_osc8_hyperlink(&commit_link_format.replace("{commit}", commit), commit); format!("{prefix}{formatted_commit}{suffix}") }) - } else if let Some(repo) = config - .git_config - .as_ref() - .and_then(GitConfig::get_remote_url) - { + } else if let Some(repo) = config.git_config().and_then(GitConfig::get_remote_url) { COMMIT_LINE_REGEX.replace(line, |captures: &Captures| { format_commit_line_captures_with_osc8_commit_hyperlink(captures, &repo) }) |