Skip to content

@WIZARDISHUNGRY /.gitattributes
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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 = "git-plutil-filter.sh"
smudge = "git-plutil-filter.sh"
#!/bin/sh
# had to do this because git doesn't like attaching stdin and out to plutil (waitpid error)
#TMPDIR isn't set for ssh logins!
TMPDIR=`getconf DARWIN_USER_TEMP_DIR`
tempfoo=`basename $0`
TMPFILE=`mktemp ${TMPDIR}/${tempfoo}.XXXXXX` || exit 1
cat > $TMPFILE
plutil -convert xml1 $TMPFILE
cat $TMPFILE
rm $TMPFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.