knbr13 / gitcs

📈 Command line tool written in Go. It allows developers to scan their local Git repositories and generate a visual contributions graph.
MIT License
116 stars 11 forks source link

Improve excluded folders handling for better performance and extensibility #29

Closed sig-seg-v13 closed 5 months ago

sig-seg-v13 commented 5 months ago

This pull request addresses several improvements to the way excluded folders are handled in the scanGitFolders function.

Changes:

  1. Replaced the excludedFolders slice with a map[string]bool for constant-time lookups, improving performance.
  2. Converted folder names to lowercase before checking for exclusion, ensuring case-insensitivity.
  3. Made the excludedFolders map extensible, allowing for easy addition or removal of folder names to exclude.