mirror of
https://github.com/git/git.git
synced 2024-06-11 02:16:16 +02:00
make --upload-pack option to git-fetch configurable
This introduces the config item remote.<name>.uploadpack to override the default value (which is "git-upload-pack"). Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
e28714c527
commit
5dee29ac0f
|
@ -429,9 +429,13 @@ remote.<name>.push::
|
||||||
gitlink:git-push[1].
|
gitlink:git-push[1].
|
||||||
|
|
||||||
remote.<name>.receivepack::
|
remote.<name>.receivepack::
|
||||||
The default program to execute on the remote side when pulling. See
|
The default program to execute on the remote side when pushing. See
|
||||||
option \--exec of gitlink:git-push[1].
|
option \--exec of gitlink:git-push[1].
|
||||||
|
|
||||||
|
remote.<name>.uploadpack::
|
||||||
|
The default program to execute on the remote side when fetching. See
|
||||||
|
option \--exec of gitlink:git-fetch-pack[1].
|
||||||
|
|
||||||
repack.usedeltabaseoffset::
|
repack.usedeltabaseoffset::
|
||||||
Allow gitlink:git-repack[1] to create packs that uses
|
Allow gitlink:git-repack[1] to create packs that uses
|
||||||
delta-base offset. Defaults to false.
|
delta-base offset. Defaults to false.
|
||||||
|
|
|
@ -85,6 +85,12 @@ case "$#" in
|
||||||
set x $origin ; shift ;;
|
set x $origin ; shift ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if test -z "$exec"
|
||||||
|
then
|
||||||
|
# No command line override and we have configuration for the remote.
|
||||||
|
exec="--upload-pack=$(get_uploadpack $1)"
|
||||||
|
fi
|
||||||
|
|
||||||
remote_nick="$1"
|
remote_nick="$1"
|
||||||
remote=$(get_remote_url "$@")
|
remote=$(get_remote_url "$@")
|
||||||
refs=
|
refs=
|
||||||
|
|
|
@ -279,3 +279,16 @@ resolve_alternates () {
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_uploadpack () {
|
||||||
|
data_source=$(get_data_source "$1")
|
||||||
|
case "$data_source" in
|
||||||
|
config)
|
||||||
|
uplp=$(git-repo-config --get "remote.$1.uploadpack")
|
||||||
|
echo ${uplp:-git-upload-pack}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "git-upload-pack"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue