cdc icon indicating copy to clipboard operation
cdc copied to clipboard

display git status of all repos

Open evanthegrayt opened this issue 4 years ago • 1 comments

Add a -g option that goes through every repo and prints git status

evanthegrayt avatar May 25 '21 17:05 evanthegrayt

I'm conflicted about how I think this should behave. My thoughts:

  • No matter what, pushd to each directory, popd out.
    • This keeps the user's directory history clean if they have AUTO_PUSHD enabled (like I do)
  • 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 git command should be run?
    • Have -g act like -w, and just print the git status of the directory passed as an argument
      • Coupled with this, -G could just loop through all
    • 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 git command, or should I let them run whatever they want
      • Arbitrary code execution could be a huge security hazard, or accidents waiting to happen

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.

evanthegrayt avatar May 26 '21 01:05 evanthegrayt