modules/git/git: Scoped some variables. Switched to an internal module for better readability.