summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorErik Faye-Lund <kusmabite@gmail.com>2009-03-23 12:53:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-04-19 19:29:26 (GMT)
commit426193c025eb76125a99b3fe143eea50e849f9ca (patch)
tree85eebe940062233481c43af23618c98ad60c4a6e /t
parent38124d8f3120b8e189760376b0a93cad6f3c475a (diff)
downloadgit-426193c025eb76125a99b3fe143eea50e849f9ca.zip
git-426193c025eb76125a99b3fe143eea50e849f9ca.tar.gz
git-426193c025eb76125a99b3fe143eea50e849f9ca.tar.bz2
builtin-fast-export.c: fix crash on tagged trees
If a tag object points to a tree (or another unhandled type), the commit- pointer is left uninitialized and later dereferenced. This patch adds a default case to the switch that issues a warning and skips the object. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t9301-fast-export.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh
index 2e31f67..b1f75ce 100755
--- a/t/t9301-fast-export.sh
+++ b/t/t9301-fast-export.sh
@@ -269,9 +269,8 @@ test_expect_success 'set-up a few more tags for tag export tests' '
'
# NEEDSWORK: not just check return status, but validate the output
-# two tests commented out due to crash and thus unreliable return code
-test_expect_failure 'tree_tag' 'git fast-export tree_tag'
-test_expect_failure 'tree_tag-obj' 'git fast-export tree_tag-obj'
+test_expect_success 'tree_tag' 'git fast-export tree_tag'
+test_expect_success 'tree_tag-obj' 'git fast-export tree_tag-obj'
test_expect_failure 'tag-obj_tag' 'git fast-export tag-obj_tag'
test_expect_failure 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'