From 2c8bce87fa2bc36fc4b2158961fcc64257b76646 Mon Sep 17 00:00:00 2001 From: u110 Date: Mon, 24 Aug 2020 18:37:33 +0900 Subject: [PATCH] --config --- lib/git/lib.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 92d603bf..e77eea0b 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -65,7 +65,8 @@ def clone(repository, name, opts = {}) arr_opts << '--bare' if opts[:bare] arr_opts << '--branch' << opts[:branch] if opts[:branch] arr_opts << '--depth' << opts[:depth].to_i if opts[:depth] && opts[:depth].to_i > 0 - arr_opts << '--config' << opts[:config] if opts[:config] + arr_opts << '--config' << opts[:config] if opts[:config] && opts[:config].is_a?(String) + opts[:config].each { |c| arr_opts << '--config' << c } if opts[:config].is_a?(Array) arr_opts << '--origin' << opts[:remote] || opts[:origin] if opts[:remote] || opts[:origin] arr_opts << '--recursive' if opts[:recursive] arr_opts << "--mirror" if opts[:mirror] @@ -965,6 +966,9 @@ def command(cmd, opts = [], chdir = true, redirect = '', &block) global_opts = global_opts.flatten.map {|s| escape(s) }.join(' ') git_cmd = "#{Git::Base.config.binary_path} #{global_opts} #{cmd} #{opts} #{redirect} 2>&1" + puts "********* Git command ************" + puts git_cmd + puts "********* Git command ************" output = nil