summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e28714c)
raw | patch | inline | side by side (parent: e28714c)
author | Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> | |
Thu, 25 Jan 2007 04:45:39 +0000 (05:45 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 25 Jan 2007 07:06:30 +0000 (23:06 -0800) |
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>
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>
Documentation/config.txt | patch | blob | history | |
git-fetch.sh | patch | blob | history | |
git-parse-remote.sh | patch | blob | history |
index 8086d753683f3b6a2eec49e51af0ed2f1c864619..3f2fa09a87b0cbfb517591ff0472b1ff5cd81ef8 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
gitlink:git-push[1].
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].
+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::
Allow gitlink:git-repack[1] to create packs that uses
delta-base offset. Defaults to false.
diff --git a/git-fetch.sh b/git-fetch.sh
index 07a1d05ac7a30b08355f330f5300492ac5afb790..61c8cf477384fbcaa125f4a90883257492f98710 100755 (executable)
--- a/git-fetch.sh
+++ b/git-fetch.sh
set x $origin ; shift ;;
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=$(get_remote_url "$@")
refs=
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 4fc602082b23c695211b4333469ae0dce1a33727..1122c8389ddb3ba860eae62483c8c55603321a20 100755 (executable)
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
esac
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
+}