]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
add a gitattributes helper script
authorRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 08:24:45 +0000 (10:24 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 08:24:45 +0000 (10:24 +0200)
.gitattributes
copy-gitattributes-to-branches.sh [new file with mode: 0755]

index bf1c4c2b8dace9423c6f3a00d9d9e58fab2086cc..04e299b8a578ea6b5028b59dc063392b202e456d 100644 (file)
@@ -1,8 +1,10 @@
-* -crlf
 *.7z -crlf -diff
+*.ac crlf=input
+*.afm crlf=input
 *.aft crlf=input
 *.aliases crlf=input
 all crlf=input
+*.am crlf=input
 *.animinfo crlf=input
 *.aps -crlf -diff
 *.ase -crlf
@@ -23,14 +25,18 @@ bsp2ent crlf=input
 ChangeLog crlf=input
 CHANGES crlf=input
 COMPILING crlf=input
+compress-texture crlf=input
 *.conf crlf=input
 CONTRIBUTORS crlf=input
 COPYING crlf=input
 *.cpp crlf=input
+create crlf=input
+* -crlf
 *.css crlf=input
 Current -crlf -diff
 *.cvsignore crlf=input
 *.cvswrappers crlf=input
+*.dat -crlf -diff
 *.db -crlf -diff
 *.default crlf=input
 *.def crlf=input
@@ -78,7 +84,9 @@ GPL crlf=input
 *.ico -crlf -diff
 *.idsoftware crlf=input
 *.inc crlf=input
+*.in crlf=input
 *.instantaction crlf=input
+*.iqm -crlf -diff
 *.java crlf=input
 *.jhm crlf=input
 *.jnlp crlf=input
@@ -104,12 +112,11 @@ makespr32 crlf=input
 *.mf crlf=input
 *.mid -crlf -diff
 *.mk crlf=input
+*.mkdir -crlf -diff
 *.mmpz -crlf -diff
 *.modinfo crlf=input
 *.modules crlf=input
 nexuiz-map-compiler crlf=input
-nexuiz-osx-agl crlf=input
-nexuiz-osx-sdl crlf=input
 *.nib -crlf
 *.obj -crlf
 OFFSETS -crlf -diff
@@ -119,6 +126,8 @@ pangorc crlf=input
 *.patch crlf=input
 *.patchsets crlf=input
 *.pcx -crlf -diff
+*.pfb -crlf -diff
+*.pfm -crlf -diff
 *.pk3 -crlf -diff
 PkgInfo crlf=input
 *.pl crlf=input
@@ -166,14 +175,18 @@ TODO crlf=input
 *.TTF -crlf -diff
 *.txt crlf=input
 *.TXT crlf=input
+update-shaderlists crlf=input
 *.vcproj -crlf
 *.wav -crlf -diff
 *.waypoints -crlf -diff
+w crlf=input
 *.width crlf=input
 *.workspace -crlf
 *.xcf -crlf -diff
 *.xlink crlf=input
 *.xml crlf=input
+xonotic-map-compiler-autobuild crlf=input
+xonotic-map-compiler crlf=input
 *.xpm crlf=input
 *.zip -crlf -diff
 zipdiff crlf=input
diff --git a/copy-gitattributes-to-branches.sh b/copy-gitattributes-to-branches.sh
new file mode 100755 (executable)
index 0000000..9d51eae
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+case "$0" in
+       /*)
+               me=$0
+               ;;
+       *)
+               me="$PWD/$0"
+               ;;
+esac
+export me
+
+case "$1" in
+       inner)
+               git config core.autocrlf input
+               git reset --hard
+               git for-each-ref 'refs/remotes/origin' | while read -r HASH TYPE REFNAME; do
+                       git checkout -t "${REFNAME#refs/remotes/}" || git checkout "${REFNAME#refs/remotes/origin/}"
+                       git reset --hard "$REFNAME"
+                       cp "${me%/*}/.gitattributes" .
+                       git update-index --refresh
+                       git commit -a -m"CRLF"
+               done
+               ;;
+       *)
+               ./all each "$me" inner
+               ;;
+esac