Skip to content

Commit 88d80ff

Browse files
authored
Add Git icon to more Git files (#65)
1 parent 0730802 commit 88d80ff

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/colors/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ fn for_filename(filename: &str) -> Option<Color> {
3636
// NOTE These should be in alphabetical order and ignoring any leading `.` for
3737
// easier code review.
3838
let color = match filename {
39-
".git" => Red.into(),
39+
".git" | ".gitattributes" | ".gitignore" | ".gitmodules" | ".git-blame-ignore-revs" => {
40+
Red.into()
41+
}
4042
".github" => Black.into(),
4143
".vscode" => Blue.into(),
4244
_ => return None,

src/icons/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ fn for_filename(filename: &str) -> Option<&'static str> {
3636
let icon = match filename {
3737
"CONTRIBUTING.md" => shared::DOC,
3838
".editorconfig" => "\u{e652}", // 
39-
".git" => "\u{e702}", // 
39+
".git" | ".gitattributes" | ".gitignore" | ".gitmodules" | ".git-blame-ignore-revs" => {
40+
"\u{e702}"
41+
} // 
4042
".github" => "\u{e709}", // 
4143
"LICENCE" | "LICENSE" | "licence" | "license" => shared::LICENSE,
4244
"package-lock.json" | "pnpm-lock.yaml" => shared::LOCK,

0 commit comments

Comments
 (0)