Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-26 01:44:46 +0400
committerJunio C Hamano <gitster@pobox.com>2014-02-26 01:45:38 +0400
commit5aae66bd998429959d89c5bedf0bd8175a2b3f33 (patch)
tree7ea854d749537e03fc2bae572ad87dd0d41f1d9d /git-request-pull.sh
parent28ad685f70f93133f2c872e4b1ea2a8f87eaebb5 (diff)
request-pull: resurrect "pretty refname" feature
When asking to fetch/pull a branch whose name is B or a tag whose name is T, we used to show the command to run as: git pull $URL B git pull $URL tags/T even when B and T were spelled in a more qualified way in order to disambiguate, e.g. heads/B or refs/tags/T, but the recent update lost this feature. Resurrect it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-request-pull.sh')
-rwxr-xr-xgit-request-pull.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-request-pull.sh b/git-request-pull.sh
index 93b41357ab..b67513a2e7 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -53,6 +53,8 @@ fi
local=${3%:*}
local=${local:-HEAD}
remote=${3#*:}
+pretty_remote=${remote#refs/}
+pretty_remote=${pretty_remote#heads/}
head=$(git symbolic-ref -q "$local")
head=${head:-$(git show-ref --heads --tags "$local" | cut -d' ' -f2)}
head=${head:-$(git rev-parse --quiet --verify "$local")}
@@ -124,7 +126,7 @@ git show -s --format='The following changes since commit %H:
are available in the git repository at:
' $merge_base &&
-echo " $url $remote" &&
+echo " $url $pretty_remote" &&
git show -s --format='
for you to fetch changes up to %H: