diff options
| author | Junio C Hamano <gitster@pobox.com> | 2011-04-15 13:25:50 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2011-04-15 13:27:04 -0700 |
| commit | ed44fd045a8a4bcf7f30a47e4fc6aba761faaf78 (patch) | |
| tree | ccc8afe7eb85ec89347047f8e3fb5ff7f4c2f6a6 /git-parse-remote.sh | |
| parent | Documentation: describe the format of messages with inline patches (diff) | |
| parent | Merge branch 'maint' (diff) | |
| download | git-ed44fd045a8a4bcf7f30a47e4fc6aba761faaf78.tar.gz git-ed44fd045a8a4bcf7f30a47e4fc6aba761faaf78.zip | |
Merge v1.7.5-rc2 into jn/format-patch-doc
This is to sync with the recent updates in Documentation/SubmittingPatches
and Documentation/format-patch.txt
Diffstat (limited to 'git-parse-remote.sh')
| -rw-r--r-- | git-parse-remote.sh | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 9b950be28d..ea093d251d 100644 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -4,56 +4,6 @@ # this would fail in that case and would issue an error message. GIT_DIR=$(git rev-parse -q --git-dir) || :; -get_data_source () { - case "$1" in - */*) - echo '' - ;; - .) - echo self - ;; - *) - if test "$(git config --get "remote.$1.url")" - then - echo config - elif test -f "$GIT_DIR/remotes/$1" - then - echo remotes - elif test -f "$GIT_DIR/branches/$1" - then - echo branches - else - echo '' - fi ;; - esac -} - -get_remote_url () { - data_source=$(get_data_source "$1") - case "$data_source" in - '') - echo "$1" - ;; - self) - echo "$1" - ;; - config) - git config --get "remote.$1.url" - ;; - remotes) - sed -ne '/^URL: */{ - s///p - q - }' "$GIT_DIR/remotes/$1" - ;; - branches) - sed -e 's/#.*//' "$GIT_DIR/branches/$1" - ;; - *) - die "internal error: get-remote-url $1" ;; - esac -} - get_default_remote () { curr_branch=$(git symbolic-ref -q HEAD) curr_branch="${curr_branch#refs/heads/}" |
