aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-13 10:44:46 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-13 10:44:46 -0700
commite82c74618b24ddaad56f085f66c90da7ad7a0cb5 (patch)
tree33f734238a21c6b5b4fba0bd7be832ae14dfda05
parent8272bcabac0b68e6d526ec0fcbc6d6e532b3e2af (diff)
parent0a0ec7bd66786bcc2204f299f6c993db19d1f53c (diff)
downloadgit-e82c74618b24ddaad56f085f66c90da7ad7a0cb5.tar.gz
git-e82c74618b24ddaad56f085f66c90da7ad7a0cb5.tar.xz
Merge branch 'cj/p4merge' into maint
* cj/p4merge: Pass empty file to p4merge where no base is suitable.
-rw-r--r--git-mergetool--lib.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index fb3f52ba2..4db921233 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -258,12 +258,9 @@ run_merge_tool () {
;;
p4merge)
if merge_mode; then
- touch "$BACKUP"
- if $base_present; then
- "$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
- else
- "$merge_tool_path" "$LOCAL" "$LOCAL" "$REMOTE" "$MERGED"
- fi
+ touch "$BACKUP"
+ $base_present || >"$BASE"
+ "$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
check_unchanged
else
"$merge_tool_path" "$LOCAL" "$REMOTE"