diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2014-04-20 13:59:27 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-04-21 11:47:34 -0700 |
commit | 4ee1b225b99f155cc9372397b5e120c2c0eee2bf (patch) | |
tree | 215db73aa6d92f9a2f10ccb69e986e1c039e5586 /t | |
parent | 9193f742350d1b97e32b0687d1577dc2b2a0d713 (diff) | |
download | git-4ee1b225b99f155cc9372397b5e120c2c0eee2bf.tar.gz |
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-x | t/t9300-fast-import.sh | 18 |
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 |