Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/mergetools/p4merge # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / mergetools / p4merge` 44 lines ยท 784 bytes Raw Blame History 1 diff_cmd () { 2 empty_file= 3 4 # p4merge does not like /dev/null 5 if test "/dev/null" = "$LOCAL" 6 then 7 LOCAL="$(create_empty_file)" 8 fi 9 if test "/dev/null" = "$REMOTE" 10 then 11 REMOTE="$(create_empty_file)" 12 fi 13 14 "$merge_tool_path" "$LOCAL" "$REMOTE" 15 16 if test -n "$empty_file" 17 then 18 rm -f "$empty_file" 19 fi 20 } 21 22 diff_cmd_help () { 23 echo "Use HelixCore P4Merge (requires a graphical session)" 24 } 25 26 merge_cmd () { 27 if ! $base_present 28 then 29 cp -- "$LOCAL" "$BASE" 30 create_virtual_base "$BASE" "$REMOTE" 31 fi 32 "$merge_tool_path" "$BASE" "$REMOTE" "$LOCAL" "$MERGED" 33 } 34 35 create_empty_file () { 36 empty_file="${TMPDIR:-/tmp}/git-difftool-p4merge-empty-file.$$" 37 >"$empty_file" 38 39 printf "%s" "$empty_file" 40 } 41 42 merge_cmd_help () { 43 echo "Use HelixCore P4Merge (requires a graphical session)" 44 }