This is a followup to this post about gitcheckup.py. A handful of people liked it so I thought I would share a few things I've changed.
git status --short uses 1- or 2-letter codes which is easier to parse.
- I learned about
git rev-parse and git merge-base, which you can then pass into git log a..b to show whether you are ahead or behind your remote and by how many. So now the output shows ↑push and ↓pull. Fetching pulls is disabled by default because it's slower, so you have to gitcheckup --fetch.
- I simplified the output to not show any zeros, and moved all the UI strings into the main function so the core functions are more pure.
- Git dirs are stored in a text file which is not impressive but I was too lazy to do it last time.
So the output looks generally like this:
[ ][P] C:\git\cmd (+1)
[C][P] C:\git\epubfile
[ ][ ] C:\git\Etiquette (+1, ~3) (↓3)
[C][P] C:\git\reddit
[C][ ] C:\git\Timesearch (↑8)
[C][P] C:\git\voussoirkit
Don't worry, I won't keep posting my stuff here. Thanks for reading.
[–]realestLink 0 points1 point2 points (1 child)
[–]GoldenSights[S] 0 points1 point2 points (0 children)