def keep(workitem)
h.workitems = h.workitems.values if h.workitems.is_a?(Hash)
if h.workitems
h.workitems << workitem
return
end
h.workitem_count = (h.workitem_count || 0) + 1
return if h.cmerge_type == 'ignore'
target, source = h.workitem, workitem
if
h.cmerge == 'first' &&
! %w[ stack union concat deep isolate ].include?(h.cmerge_type)
then
target, source = source, target
end
target, source = source, target if target && target.delete('winner')
target, source = source, target if source == nil
h.workitem = Ruote.merge_workitem(
workitem_index(workitem), target, source, h.cmerge_type)
end