fast-import: filemodify after M 040000 <tree> "" crashes
commit5edde510181357b0d0376d5542ddfa51a7e7ba12
authorJonathan Nieder <jrnieder@gmail.com>
Mon, 18 Oct 2010 01:03:38 +0000 (17 20:03 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Oct 2010 23:41:27 +0000 (18 16:41 -0700)
treef80b1b6c6f516aad910d30d59f8589ac88a4adfb
parent2794ad524462c4e2ecd4573d650e7b4f8da89a5d
fast-import: filemodify after M 040000 <tree> "" crashes

Until M 040000 <tree> "" syntax was introduced in commit 2794ad5
(fast-import: Allow filemodify to set the root, 2010-10-10), it
was impossible for the root entry to refer to an unloaded tree.
Update various functions to take that possibility into account.
Otherwise

M 040000 <tree> ""
M 100644 :1 "foo"

and similar commands (using D, C, or R after resetting the root
tree) segfault.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import.c
t/t9300-fast-import.sh