public
anonymous / p4merge
Last active

p4merge script for Windows; to be placed in C:\Program Files(x86)\Git\bin (MSYS Git)

  • Download Gist
p4merge
Shell
1 2 3 4 5 6 7
#!/bin/bash
 
NULL=$TMP/$$.NULL
for arg; do [[ $arg = /dev/null ]] && arg=$NULL && echo "" >"$arg"; args+=("$arg"); done;
 
/c/Program\ Files/Perforce/p4merge "${args[@]}"
[[ -f $NULL ]] && rm $NULL

The echo "" >"$arg" adds an unnecessary (and annoying) empty line to the temporary file. I use touch "$arg" instead.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.