Merge branch 'ap/combine-diff-ignore-whitespace'
[gitweb.git] / mergetools / p4merge
index 8a36916567a234c354af9994df9c28788749e7fa..5a608abf9c77f436ab1472592e3d5777ef83805d 100644 (file)
@@ -21,8 +21,12 @@ diff_cmd () {
 
 merge_cmd () {
        touch "$BACKUP"
-       $base_present || >"$BASE"
-       "$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
+       if ! $base_present
+       then
+               cp -- "$LOCAL" "$BASE"
+               create_virtual_base "$BASE" "$REMOTE"
+       fi
+       "$merge_tool_path" "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
        check_unchanged
 }