From 91fb87a65f2eb14968fee9160804c0ad25c286c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karl=20Hasselstr=C3=B6m?= Date: Mon, 20 Aug 2007 22:36:00 +0100 Subject: [PATCH] =?utf8?q?New=20test:=20make=20sure=20that=20StGIT=C2=A0ca?= =?utf8?q?n=20=09handle=20packed=20refs?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It currently can't, which is why this test is needed. The situation has recently taken a turn for the worse, since git-gc nowadays packs refs by default. --- t/t1004-pack-ref.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 t/t1004-pack-ref.sh diff --git a/t/t1004-pack-ref.sh b/t/t1004-pack-ref.sh new file mode 100755 index 0000000..5339a5d --- /dev/null +++ b/t/t1004-pack-ref.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# +# Copyright (c) 2007 Karl Hasselström +# + +test_description='Test that StGIT can handle packed refs' + +. ./test-lib.sh +stg init + +test_expect_success \ + 'Pack refs and make sure that we can still see them' ' + stg branch -c foo && + [ $(stg branch -l | tee /dev/stderr | wc -l) -eq 2 ] && + git pack-refs --all && + [ $(stg branch -l | tee /dev/stderr | wc -l) -eq 2 ] +' + +test_expect_success \ + 'Try to delete a branch whose ref has been packed' ' + stg branch -d master +' + +test_done -- 2.11.4.GIT