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:
authorJay Soffian <jaysoffian@gmail.com>2009-02-25 11:32:24 +0300
committerJunio C Hamano <gitster@pobox.com>2009-02-28 02:19:09 +0300
commite61e0cc6b7061d7e791e1c9722b9c4a6d85d629c (patch)
tree1d0d9b446d13d96ec13cf5eecc05968d069c5020 /t/t5505-remote.sh
parent3bd925636cd11400d1840b39d0d18b640f32bdd2 (diff)
builtin-remote: teach show to display remote HEAD
This is in preparation for teaching remote how to set refs/remotes/<remote>/HEAD to match what HEAD is set to at <remote>, but is useful in its own right. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5505-remote.sh')
-rwxr-xr-xt/t5505-remote.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index a13d4b66d6..91525c3f9c 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -136,6 +136,7 @@ EOF
cat > test/expect << EOF
* remote origin
URL: $(pwd)/one
+ HEAD branch: master
Remote branch merged with 'git pull' while on branch master
master
New remote branch (next fetch will store in remotes/origin)
@@ -146,6 +147,11 @@ cat > test/expect << EOF
Local branches pushed with 'git push'
master:upstream
+refs/tags/lastbackup
+* remote two
+ URL: ../two
+ HEAD branch (remote HEAD is ambiguous, may be one of the following):
+ another
+ master
EOF
test_expect_success 'show' '
@@ -154,6 +160,7 @@ test_expect_success 'show' '
refs/heads/master:refs/heads/upstream &&
git fetch &&
git branch -d -r origin/master &&
+ git config --add remote.two.url ../two &&
(cd ../one &&
echo 1 > file &&
test_tick &&
@@ -162,13 +169,14 @@ test_expect_success 'show' '
refs/heads/master:refs/heads/upstream &&
git config --add remote.origin.push \
+refs/tags/lastbackup &&
- git remote show origin > output &&
+ git remote show origin two > output &&
test_cmp expect output)
'
cat > test/expect << EOF
* remote origin
URL: $(pwd)/one
+ HEAD branch: (not queried)
Remote branch merged with 'git pull' while on branch master
master
Tracked remote branches
@@ -343,7 +351,7 @@ test_expect_success '"remote show" does not show symbolic refs' '
git clone one three &&
(cd three &&
git remote show origin > output &&
- ! grep HEAD < output &&
+ ! grep "^ *HEAD$" < output &&
! grep -i stale < output)
'