Last active
August 4, 2021 12:56
-
-
Save aplatypus/5ac6ba4bab2b145a3a24ef9760b836b4 to your computer and use it in GitHub Desktop.
Git diff.external script ... Handles multiple file diffs. Git will make tempory a file(s) when it is comparing from the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# * expects meld to be on your default PATH | |
# | |
function detach_meld() | |
{ | |
local f1="/tmp/mld1-$(basename "$1")" | |
local f2="/tmp/mld2-$(basename "$2")" | |
## echo "f1 = ${f1}" | |
## echo "f2 = ${f2}" | |
cp "$1" "${f1}" | |
cp "$2" "${f2}" | |
# | |
(meld --newtab "${f1}" "${f2}" ; rm "${f1}" "${f2}" ) > /dev/null 2>&1 & | |
} | |
detach_meld "$2" "$5" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment