Skip to content

Commit 6c252ef

Browse files
committed
Merge branch 'cj/p4merge'
* cj/p4merge: Pass empty file to p4merge where no base is suitable.
2 parents 2da61dc + 0a0ec7b commit 6c252ef

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

git-mergetool--lib.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,9 @@ run_merge_tool () {
258258
;;
259259
p4merge)
260260
if merge_mode; then
261-
touch "$BACKUP"
262-
if $base_present; then
263-
"$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
264-
else
265-
"$merge_tool_path" "$LOCAL" "$LOCAL" "$REMOTE" "$MERGED"
266-
fi
261+
touch "$BACKUP"
262+
$base_present || >"$BASE"
263+
"$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
267264
check_unchanged
268265
else
269266
"$merge_tool_path" "$LOCAL" "$REMOTE"

0 commit comments

Comments
 (0)