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
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-06-13 09:55:44 +0400
committerJunio C Hamano <gitster@pobox.com>2008-06-13 09:55:44 +0400
commitdc92cc20f8dcfefcd5d79e8550736bcc437ea2e4 (patch)
tree7d38aa79d84fe7635876ccfaacedcfe3886c7b74 /t
parentd8933f013a66cc1deadf83a9c24eccb6fee78a35 (diff)
parent8b7d4e738ee5489fecb5c4a55d14884b09e0dc6d (diff)
Merge branch 'om/remote-fix'
* om/remote-fix: "remote prune": be quiet when there is nothing to prune remote show: list tracked remote branches with -n remote prune: print the list of pruned branches builtin-remote: split show_or_prune() in two separate functions remote show: fix the -n option
Diffstat (limited to 't')
-rwxr-xr-xt/t5505-remote.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 0d7ed1f99b..1e192a2207 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -138,6 +138,25 @@ test_expect_success 'show' '
test_cmp expect output)
'
+cat > test/expect << EOF
+* remote origin
+ URL: $(pwd)/one/.git
+ Remote branch merged with 'git pull' while on branch master
+ master
+ Tracked remote branches
+ master side
+ Local branches pushed with 'git push'
+ master:upstream +refs/tags/lastbackup
+EOF
+
+test_expect_success 'show -n' '
+ (mv one one.unreachable &&
+ cd test &&
+ git remote show -n origin > output &&
+ mv ../one.unreachable ../one &&
+ test_cmp expect output)
+'
+
test_expect_success 'prune' '
(cd one &&
git branch -m side side2) &&
@@ -148,6 +167,24 @@ test_expect_success 'prune' '
! git rev-parse refs/remotes/origin/side)
'
+cat > test/expect << EOF
+Pruning origin
+URL: $(pwd)/one/.git
+ * [would prune] origin/side2
+EOF
+
+test_expect_success 'prune --dry-run' '
+ (cd one &&
+ git branch -m side2 side) &&
+ (cd test &&
+ git remote prune --dry-run origin > output &&
+ git rev-parse refs/remotes/origin/side2 &&
+ ! git rev-parse refs/remotes/origin/side &&
+ (cd ../one &&
+ git branch -m side side2) &&
+ test_cmp expect output)
+'
+
test_expect_success 'add --mirror && prune' '
(mkdir mirror &&
cd mirror &&