summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Felipe Contreras <felipe.contreras@gmail.com>2014-04-20 13:59:27 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-04-21 11:47:34 -0700
commit4ee1b225b99f155cc9372397b5e120c2c0eee2bf (patch)
tree215db73aa6d92f9a2f10ccb69e986e1c039e5586 /t
parenttransport-helper: add support to push symbolic refs (diff)
downloadtgif-4ee1b225b99f155cc9372397b5e120c2c0eee2bf.tar.xz
fast-import: add support to delete refs
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t9300-fast-import.sh18
1 files changed, 18 insertions, 0 deletions
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