From 4ee1b225b99f155cc9372397b5e120c2c0eee2bf Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Sun, 20 Apr 2014 13:59:27 -0500 Subject: fast-import: add support to delete refs Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- t/t9300-fast-import.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 't') diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 27263dfb80..5fc9ef262a 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -2999,4 +2999,22 @@ test_expect_success 'T: ls root tree' ' test_cmp expect actual ' +test_expect_success 'T: delete branch' ' + git branch to-delete && + git fast-import <<-EOF && + reset refs/heads/to-delete + from 0000000000000000000000000000000000000000 + EOF + test_must_fail git rev-parse --verify refs/heads/to-delete +' + +test_expect_success 'T: empty reset doesnt delete branch' ' + git branch not-to-delete && + git fast-import <<-EOF && + reset refs/heads/not-to-delete + EOF + git show-ref && + git rev-parse --verify refs/heads/not-to-delete +' + test_done -- cgit v1.2.3