Skip to content

Commit 1a92777

Browse files
Uwe Kleine-Königgitster
authored andcommitted
git-request-pull: open-code the only invocation of get_remote_url
So sh:get_remote_url can go now and git-request-pull doesn't need to source git-parse-remote. anymore. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 45781ad commit 1a92777

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

git-parse-remote.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
# this would fail in that case and would issue an error message.
55
GIT_DIR=$(git rev-parse -q --git-dir) || :;
66

7-
get_remote_url () {
8-
git ls-remote --get-url "$1"
9-
}
10-
117
get_default_remote () {
128
curr_branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
139
origin=$(git config --get "branch.$curr_branch.remote")

git-request-pull.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ p show patch text as well
1515
'
1616

1717
. git-sh-setup
18-
. git-parse-remote
1918

2019
GIT_PAGER=
2120
export GIT_PAGER
@@ -55,7 +54,7 @@ branch=$(git ls-remote "$url" \
5554
p
5655
q
5756
}")
58-
url=$(get_remote_url "$url")
57+
url=$(git ls-remote --get-url "$url")
5958
if [ -z "$branch" ]; then
6059
echo "warn: No branch of $url is at:" >&2
6160
git log --max-count=1 --pretty='tformat:warn: %h: %s' $headrev >&2

0 commit comments

Comments
 (0)