Revert "Enable the wincred credential helper by default for Windows users."
[msysgit.git] / bin / apply-from-gmane.sh
blobd40b42c403536e06639a881969c0e8153c7276a6
1 #!/bin/sh
3 URL="$1"
5 case "$URL" in
6 http://mid.gmane.org*)
7 TMP=.git/apply.tmp
8 curl -D $TMP "$URL" > /dev/null
9 URL=$(sed -n 's/^Location: //p' < $TMP | tr -d '\r\n');;
10 http://thread.*) URL=http://article.${URL#http://thread.};;
11 http://*|article.gmane.org*) ;;
12 *@*)
13 TMP=.git/apply.tmp
14 curl -D $TMP http://mid.gmane.org/$1 > /dev/null
15 URL=$(sed -n 's/^Location: //p' < $TMP | tr -d '\r\n');;
16 *) URL=http://article.gmane.org/gmane.comp.version-control.msysgit/$1;;
17 esac
19 case "$URL" in
20 */raw) ;;
21 *) URL=${URL%/}/raw;;
22 esac
24 curl $URL | git am --whitespace=fix -s