Pass arguments to appropriate git commands

This commit is contained in:
Elara 2021-05-21 18:44:22 -07:00
parent 29efee120e
commit 8b4b617893

View File

@ -29,10 +29,10 @@ end
case args[0] case args[0]
when "push" when "push"
log "Intercepted push command" log "Intercepted push command"
repos.each { |name, _| system "git push #{name} #{branch}" } repos.each { |name, _| system "git push #{name} #{branch}", *args[1...] }
when "init" when "init"
log "Intercepted init command" log "Intercepted init command"
system "git init" system "git init", *args[1...]
repos.each { |name, repo| system "git remote add #{name} #{repo}" } repos.each { |name, repo| system "git remote add #{name} #{repo}" }
system "git fetch origin" system "git fetch origin"
system "git checkout master" system "git checkout master"