lib/git_cli.rb in git_cli-0.12.0 vs lib/git_cli.rb in git_cli-0.13.6
- old
+ new
@@ -14,11 +14,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
require "git_cli/version"
-require 'gvcs'
+#require 'gvcs'
require 'toolrack'
require_relative "git_cli/git_core"
require_relative "git_cli/init"
require_relative "git_cli/clone"
@@ -45,11 +45,12 @@
include Antrapol::ToolRack::ConditionUtils
include Antrapol::ToolRack::ExceptionUtils
def os_exec(path, &block)
- Gvcs::Config.instance.command_output.puts("Git command : #{path}") if Gvcs::Config.instance.is_show_vcs_command?
+ #Gvcs::Config.instance.command_output.puts("Git command : #{path}") if Gvcs::Config.instance.is_show_vcs_command?
+ log_debug("Git command : #{path}")
# redirect stderr to stdout
path = "#{path} 2>&1"
if dry_run
block.call(:dry_run_command, path) if block
@@ -145,11 +146,11 @@
#raise_if_empty(vcs , "VCS cannot be empty", GitCliException)
raise_if_empty(path, "Workspace path cannot be empty", GitCliException)
if is_empty?(vcs)
- @vcs = Gvcs::Vcs.new
+ @vcs = GitCli::Vcs.new
else
@vcs = vcs
end
#@vcs = vcs
@@ -230,16 +231,18 @@
end
@wsRoot
end # workspace_root
+ #class <<self
alias_method :root_path, :workspace_root
+ #end
def load_remote_to_repos
conf = remote_config
conf.each do |k,v|
- repo = Gvcs::Repository.new(k, v.values.first)
+ repo = GitCli::Repository.new(k, v.values.first)
repo.support_fetch if v.keys.include?("fetch")
repo.support_push if v.keys.include?("push")
add_repos(repo)
end
end
@@ -255,11 +258,17 @@
nd, nf = new_files
md, mf = modified_files
dd, df = deleted_files
sd, sf = staged_files
- (nd.length == 0 and nf.length == 0 and md.length == 0 and mf.length == 0 and dd.length == 0 and df.length == 0 and sd.length == 0 and sf.length == 0)
+ #log_debug "New Dir : #{nd}"
+ #log_debug "Mod Dir : #{md}"
+ #log_debug "Del Dir : #{dd}"
+ #log_debug "Stg Dir : #{sd}"
+
+ #(nd.length == 0 and nf.length == 0 and md.length == 0 and mf.length == 0 and dd.length == 0 and df.length == 0 and sd.length == 0 and sf.length == 0)
+ (nf.length == 0 and mf.length == 0 and df.length == 0 and sf.length == 0)
end
alias_method :clean?, :is_clean?
alias_method :clear?, :is_clean?
def self.args_to_string_array(*args)
@@ -321,9 +330,9 @@
end # repository
end
# backward compatibility
-Gvcs::Vcs = GitCli::Vcs
-Gvcs::Workspace = GitCli::Workspace
-Gvcs::Repository = GitCli::Repository
+#Gvcs::Vcs = GitCli::Vcs
+#Gvcs::Workspace = GitCli::Workspace
+#Gvcs::Repository = GitCli::Repository