From 4ebc914c880cf724222a6e5097a21a85ed8e5951 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 29 Feb 2008 01:46:07 +0000 Subject: builtin-remote: prune remotes correctly that were added with --mirror This adds special handling for mirror remotes. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t5505-remote.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 't') diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 5986982ad..0a25c8b71 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -128,4 +128,20 @@ test_expect_success 'prune' ' ! git rev-parse refs/remotes/origin/side) ' +test_expect_success 'add --mirror && prune' ' + (mkdir mirror && + cd mirror && + git init && + git remote add --mirror -f origin ../one) && + (cd one && + git branch -m side2 side) && + (cd mirror && + git rev-parse --verify refs/heads/side2 && + ! git rev-parse --verify refs/heads/side && + git fetch origin && + git remote prune origin && + ! git rev-parse --verify refs/heads/side2 && + git rev-parse --verify refs/heads/side) +' + test_done -- cgit v1.2.1