Skip to content

Commit

Permalink
git-request-pull: open-code the only invocation of get_remote_url
Browse files Browse the repository at this point in the history
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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Uwe Kleine-König authored and Junio C Hamano committed Mar 2, 2011
1 parent 45781ad commit 1a92777
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions git-parse-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
# this would fail in that case and would issue an error message.
GIT_DIR=$(git rev-parse -q --git-dir) || :;

get_remote_url () {
git ls-remote --get-url "$1"
}

get_default_remote () {
curr_branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
origin=$(git config --get "branch.$curr_branch.remote")
Expand Down
3 changes: 1 addition & 2 deletions git-request-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ p show patch text as well
'

. git-sh-setup
. git-parse-remote

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

0 comments on commit 1a92777

Please sign in to comment.