Prevent diff machinery from examining assume-unchanged entries on worktree
[gitweb.git] / t / t5505-remote.sh
index 69e241a0a5898e562eb6e79dfa33bc7be647990d..852ccb5d7d649a71eeab25eadce6940b9c2a6f63 100755 (executable)
@@ -135,43 +135,58 @@ EOF
 
 cat > test/expect << EOF
 * remote origin
-  URL: $(pwd)/one
+  Fetch URL: $(pwd)/one
+  Push  URL: $(pwd)/one
   HEAD branch: master
   Remote branches:
     master new (next fetch will store in remotes/origin)
     side   tracked
   Local branches configured for 'git pull':
+    ahead    merges with remote master
     master   merges with remote master
     octopus  merges with remote topic-a
                 and with remote topic-b
                 and with remote topic-c
     rebase  rebases onto remote master
-  Local branches pushed with 'git push'
-    master:upstream
-    +refs/tags/lastbackup
+  Local refs configured for 'git push':
+    master pushes to master   (local out of date)
+    master pushes to upstream (create)
 * remote two
-  URL: ../two
+  Fetch URL: ../two
+  Push  URL: ../three
   HEAD branch (remote HEAD is ambiguous, may be one of the following):
     another
     master
+  Local refs configured for 'git push':
+    ahead  forces to master  (fast forwardable)
+    master pushes to another (up to date)
 EOF
 
 test_expect_success 'show' '
        (cd test &&
         git config --add remote.origin.fetch refs/heads/master:refs/heads/upstream &&
         git fetch &&
+        git checkout -b ahead origin/master &&
+        echo 1 >> file &&
+        test_tick &&
+        git commit -m update file &&
+        git checkout master &&
         git branch --track octopus origin/master &&
         git branch --track rebase origin/master &&
         git branch -d -r origin/master &&
         git config --add remote.two.url ../two &&
+        git config --add remote.two.pushurl ../three &&
         git config branch.rebase.rebase true &&
         git config branch.octopus.merge "topic-a topic-b topic-c" &&
         (cd ../one &&
          echo 1 > file &&
          test_tick &&
          git commit -m update file) &&
-        git config remote.origin.push refs/heads/master:refs/heads/upstream &&
+        git config --add remote.origin.push : &&
+        git config --add remote.origin.push refs/heads/master:refs/heads/upstream &&
         git config --add remote.origin.push +refs/tags/lastbackup &&
+        git config --add remote.two.push +refs/heads/ahead:refs/heads/master &&
+        git config --add remote.two.push refs/heads/master:refs/heads/another &&
         git remote show origin two > output &&
         git branch -d rebase octopus &&
         test_cmp expect output)
@@ -179,16 +194,19 @@ test_expect_success 'show' '
 
 cat > test/expect << EOF
 * remote origin
-  URL: $(pwd)/one
+  Fetch URL: $(pwd)/one
+  Push  URL: $(pwd)/one
   HEAD branch: (not queried)
   Remote branches: (status not queried)
     master
     side
-  Local branch configured for 'git pull':
+  Local branches configured for 'git pull':
+    ahead  merges with remote master
     master merges with remote master
-  Local branches pushed with 'git push'
-    master:upstream
-    +refs/tags/lastbackup
+  Local refs configured for 'git push' (status not queried):
+    (matching)           pushes to (matching)
+    refs/heads/master    pushes to refs/heads/upstream
+    refs/tags/lastbackup forces to refs/tags/lastbackup
 EOF
 
 test_expect_success 'show -n' '
@@ -480,5 +498,15 @@ test_expect_success 'remote prune to cause a dangling symref' '
        grep "dangling symref" err
 '
 
+test_expect_success 'show empty remote' '
+
+       test_create_repo empty &&
+       git clone empty empty-clone &&
+       (
+               cd empty-clone &&
+               git remote show origin
+       )
+'
+
 test_done