soypat / gitaligned

Find out where you fall on the Open-Source Character Alignment Chart

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow specifying branch

frenata opened this issue · comments

First of all, great idea. :)

Second, I noticed once I ramped the -n flag up that the commit count is way higher than I expected, then I realized that the tool must be looking at all branches in the repo. Since I frequently use less than optimal commit messages while working on a branch before cleaning it up to propose a change, it'd be great to add a flag that allowed specifying the branch(s) to scan.

This would be pretty cool. Although, I also had the thought of crawling into multiple repositories in #4 and I wonder if this flag should just be ignored in that case since it'd be kind of funky if some repos had the branch and others didn't.
¯\_(ツ)_/¯

Reasonable question! Depending on how #4 gets implemented (and the desired behavior when combining these features), you could adjust the logic I added to either fallback to --all if the specified branch isn't present or to ignore that repo if the specified branch isn't present.

Probably most people will just use -b to specify master, main, or develop though, depending on how their org names the mainline branch, and it'll work either way. :)