rkj-repos: code cleanup and updated with functions from lib/git.zsh (thx @mcornella)