summaryrefslogtreecommitdiff
path: root/git-parse-remote.sh
diff options
context:
space:
mode:
authorUwe Kleine-König <ukleinek@informatik.uni-freiburg.de>2007-01-25 04:45:39 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-01-25 07:06:30 (GMT)
commit5dee29ac0fc95999a42c5cbac767724a9ff73cfa (patch)
tree657b55a44ddf363f6a9540b0b4e5eb900ab99bc1 /git-parse-remote.sh
parente28714c527339a477fca226765163b9361d94285 (diff)
downloadgit-5dee29ac0fc95999a42c5cbac767724a9ff73cfa.zip
git-5dee29ac0fc95999a42c5cbac767724a9ff73cfa.tar.gz
git-5dee29ac0fc95999a42c5cbac767724a9ff73cfa.tar.bz2
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>
Diffstat (limited to 'git-parse-remote.sh')
-rwxr-xr-xgit-parse-remote.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 4fc6020..1122c83 100755
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -279,3 +279,16 @@ resolve_alternates () {
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
+}