We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fc718b9 + 75def6c commit ec8a9e4Copy full SHA for ec8a9e4
src/info.rs
@@ -8,6 +8,7 @@ use {
8
colored::{Color, ColoredString, Colorize},
9
git2::Repository,
10
image::DynamicImage,
11
+ regex::Regex,
12
std::{ffi::OsStr, fmt::Write, fs},
13
tokio::process::Command,
14
};
@@ -439,9 +440,11 @@ impl Info {
439
440
let mut remote_url = String::new();
441
let mut repository_name = String::new();
442
443
+ let remote_regex = Regex::new(r"remote\.[a-zA-Z0-9]+\.url").unwrap();
444
+
445
for entry in &config.unwrap().entries(None).unwrap() {
446
let entry = entry.unwrap();
- if let "remote.origin.url" = entry.name().unwrap() {
447
+ if remote_regex.is_match(entry.name().unwrap()) {
448
remote_url = entry.value().unwrap().to_string()
449
450
}
0 commit comments