Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Apple's .plist files have two equivalent on-disk representations, binary and xml. These snippets help keep binary crap out of your repository.
*.plist filter=xmlplist
# surprise! Quartz patches are plists, too!
*.qtz filter=xmlplist
[filter "xmlplist"]
clean = ""
smudge = ""
# had to do this because git doesn't like attaching stdin and out to plutil (waitpid error)
#TMPDIR isn't set for ssh logins!
tempfoo=`basename $0`
TMPFILE=`mktemp ${TMPDIR}/${tempfoo}.XXXXXX` || exit 1
cat > $TMPFILE
plutil -convert xml1 $TMPFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment