X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=copy-gitattributes-to-branches.sh;h=dd6c51e93f149c24f56f211518be5477a2fd7e8c;hp=90b98ed413c8b5e7729b87286822a27f3bad0db3;hb=93fc58484e0aedf13ffa8b842a0c96906cad41e6;hpb=e27b6944b15b7d1847011770d6393fb78f3d1efa diff --git a/copy-gitattributes-to-branches.sh b/copy-gitattributes-to-branches.sh index 90b98ed4..dd6c51e9 100755 --- a/copy-gitattributes-to-branches.sh +++ b/copy-gitattributes-to-branches.sh @@ -22,10 +22,14 @@ case "$1" in esac git checkout -t "${REFNAME#refs/remotes/}" || git checkout "${REFNAME#refs/remotes/origin/}" git reset --hard "$REFNAME" - echo "$attr" > "${me%/*}/.gitattributes" + echo "$attr" > ".gitattributes" + find . -type f -exec touch {} \+ git update-index --refresh + git add .gitattributes git commit -a -m"CRLF fixes, .gitattributes file updated" done + git checkout master + true ;; *) attr=`cat .gitattributes`