Revision 5841520b034ab08f132f7d066a19163a9e3d4c07 authored by Enrique Tobis on 26 June 2015, 18:19:04 UTC, committed by Junio C Hamano on 29 June 2015, 16:57:43 UTC
We set CURLOPT_PROXYAUTH to use the most secure authentication
method available only when the user has set configuration variables
to specify a proxy.  However, libcurl also supports specifying a
proxy through environment variables.  In that case libcurl defaults
to only using the Basic proxy authentication method, because we do
not use CURLOPT_PROXYAUTH.

Set CURLOPT_PROXYAUTH to always use the most secure authentication
method available, even when there is no git configuration telling us
to use a proxy. This allows the user to use environment variables to
configure a proxy that requires an authentication method different
from Basic.

Signed-off-by: Enrique A. Tobis <etobis@twosigma.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 3d4a3ff
Raw File
convert-grafts-to-replace-refs.sh
#!/bin/sh

# You should execute this script in the repository where you
# want to convert grafts to replace refs.

GRAFTS_FILE="${GIT_DIR:-.git}/info/grafts"

. $(git --exec-path)/git-sh-setup

test -f "$GRAFTS_FILE" || die "Could not find graft file: '$GRAFTS_FILE'"

grep '^[^# ]' "$GRAFTS_FILE" |
while read definition
do
	if test -n "$definition"
	then
		echo "Converting: $definition"
		git replace --graft $definition ||
			die "Conversion failed for: $definition"
	fi
done

mv "$GRAFTS_FILE" "$GRAFTS_FILE.bak" ||
	die "Could not rename '$GRAFTS_FILE' to '$GRAFTS_FILE.bak'"

echo "Success!"
echo "All the grafts in '$GRAFTS_FILE' have been converted to replace refs!"
echo "The grafts file '$GRAFTS_FILE' has been renamed: '$GRAFTS_FILE.bak'"
back to top