def subtree_up(path = Dir.pwd)
      error "Unable to pull subtree(s): Dirty Git repository" if FalkorLib::Git.dirty?( path )
      exit_status = 0
      git_root_dir = rootdir(path)
      Dir.chdir(git_root_dir) do
        FalkorLib.config.git[:subtrees].each do |dir, conf|
          next if conf[:url].nil?
          #url    = conf[:url]
          remote = dir.gsub(/\//, '-')
          branch = (conf[:branch].nil?) ? 'master' : conf[:branch]
          remotes = FalkorLib::Git.remotes
          info "Pulling changes into subtree '#{dir}' using remote '#{remote}/#{branch}'"
          raise IOError, "The git remote '#{remote}' is not configured" unless remotes.include?( remote )
          info "\t\\__ fetching remote '#{remotes.join(',')}'"
          FalkorLib::Git.fetch( git_root_dir )
          raise IOError, "The git subtree directory '#{dir}' does not exists" unless File.directory?( File.join(git_root_dir, dir) )
          info "\t\\__ pulling changes"
          exit_status = execute "git subtree pull --prefix #{dir} --squash #{remote} #{branch}"
          #exit_status = puts "git subtree pull --prefix #{dir} --squash #{remote} #{branch}"
        end
      end
      exit_status
    end
def subtree_up(path = Dir.pwd)
      error "Unable to pull subtree(s): Dirty Git repository" if FalkorLib::Git.dirty?( path )
      exit_status = 0
      git_root_dir = rootdir(path)
      Dir.chdir(git_root_dir) do
        FalkorLib.config.git[:subtrees].each do |dir, conf|
          next if conf[:url].nil?
          #url    = conf[:url]
          remote = dir.gsub(/\//, '-')
          branch = (conf[:branch].nil?) ? 'master' : conf[:branch]
          remotes = FalkorLib::Git.remotes
          info "Pulling changes into subtree '#{dir}' using remote '#{remote}/#{branch}'"
          raise IOError, "The git remote '#{remote}' is not configured" unless remotes.include?( remote )
          info "\t\\__ fetching remote '#{remotes.join(',')}'"
          FalkorLib::Git.fetch( git_root_dir )
          raise IOError, "The git subtree directory '#{dir}' does not exists" unless File.directory?( File.join(git_root_dir, dir) )
          info "\t\\__ pulling changes"
          exit_status = execute "git subtree pull --prefix #{dir} --squash #{remote} #{branch}"
          #exit_status = puts "git subtree pull --prefix #{dir} --squash #{remote} #{branch}"
        end
      end
      exit_status
    end
Pull the latest changes, assuming the git repository is not dirty