Skip merge_operations which are not SOURCE_COPY am: 59724d8ad0

Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1581809

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieea2a354e7492333ddfd366219b7575a4c7ff6bb
diff --git a/common/cow_operation_convert.cc b/common/cow_operation_convert.cc
index 4dc73a7..2564abf 100644
--- a/common/cow_operation_convert.cc
+++ b/common/cow_operation_convert.cc
@@ -20,6 +20,7 @@
 
 #include "update_engine/payload_generator/extent_ranges.h"
 #include "update_engine/payload_generator/extent_utils.h"
+#include "update_engine/update_metadata.pb.h"
 
 namespace chromeos_update_engine {
 
@@ -40,6 +41,9 @@
   // This loop handles CowCopy blocks within SOURCE_COPY, and the next loop
   // converts the leftover blocks to CowReplace?
   for (const auto& merge_op : merge_operations) {
+    if (merge_op.type() != CowMergeOperation::COW_COPY) {
+      continue;
+    }
     merge_extents.AddExtent(merge_op.dst_extent());
     const auto& src_extent = merge_op.src_extent();
     const auto& dst_extent = merge_op.dst_extent();