cdc
cdc copied to clipboard
display git status of all repos
Add a -g option that goes through every repo and prints git status
I'm conflicted about how I think this should behave. My thoughts:
- No matter what,
pushdto each directory,popdout.- This keeps the user's directory history clean if they have
AUTO_PUSHDenabled (like I do)
- This keeps the user's directory history clean if they have
- In each directory, I could either
- literally just call
git status- This produces a lot of possibly unnecessary output
- Check if the repo is dirty. If so, add it to an array and print at the end
- Which
gitcommand should be run?
- Which
- Have
-gact like-w, and just print thegit statusof the directory passed as an argument- Coupled with this,
-Gcould just loop through all
- Coupled with this,
- Let the user pick their own command by setting a variable, or even by specifying at runtime
- Should I check to make sure it's a
gitcommand, or should I let them run whatever they want - Arbitrary code execution could be a huge security hazard, or accidents waiting to happen
- Should I check to make sure it's a
- literally just call
After typing all these out, the -g and -G option are sounding the best to me right now. If anyone has any opinions, that'd be helpful.