lib/origen/revision_control/git.rb in origen-0.60.7 vs lib/origen/revision_control/git.rb in origen-0.60.8

- old
+ new

@@ -64,10 +64,11 @@ end else if paths.size > 1 || paths.first != local.to_s fail 'The Git driver does not support partial merge checkout, it has to be the whole workspace' end + git 'reset HEAD' res = git 'stash', options stashed = !res.any? { |l| l =~ /^No local changes to save/ } git 'pull', options git "checkout #{version}", options @@ -120,15 +121,15 @@ if changes_pending_commit? cmd = 'commit' if options[:comment] && !options[:comment].strip.empty? cmd += " -m \"#{options[:comment].strip}\"" else - cmd += " -m \"No comment!\"" + cmd += ' -m "No comment!"' end if options[:author] if options[:author].respond_to?(:name_and_email) - author = options[:author].name_and_email + author = options[:author].name_and_email else author = "#{options[:author]} <>" end cmd += " --author=\"#{author}\"" end @@ -344,9 +345,10 @@ !(git('status --verbose', verbose: false).last =~ /^(no changes|nothing to commit|nothing added to commit but untracked files present)/) end def initialize_local_dir(options = {}) return if options[:build_method] == :clone + super unless initialized?(options) Origen.log.debug "Initializing Git workspace at #{local}" git 'init' git 'remote remove origin', verbose: false, check_errors: false