lib/origen/revision_control/git.rb in origen-0.0.5 vs lib/origen/revision_control/git.rb in origen-0.0.6

- old
+ new

@@ -24,17 +24,19 @@ exit 1 end if options[:force] git 'reset HEAD' + git 'pull', options git "checkout #{version} #{paths.join(' ')}", options 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 if stashed result = git 'stash pop', { check_errors: false }.merge(options) conflicts = [] result.each do |line|