diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2014-04-20 22:59:27 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-04-21 22:47:34 +0400 |
commit | 4ee1b225b99f155cc9372397b5e120c2c0eee2bf (patch) | |
tree | 215db73aa6d92f9a2f10ccb69e986e1c039e5586 /t/t9300-fast-import.sh | |
parent | 9193f742350d1b97e32b0687d1577dc2b2a0d713 (diff) |
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/t9300-fast-import.sh')
-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 |