read-tree: fix bogus debugging statement.
We wanted to detect case #16 which should be rare, but botched the case when some paths are missing, causing a segfault. My fault. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
@ -362,7 +362,10 @@ static int keep_entry(struct cache_entry *ce)
|
|||||||
static void show_stage_entry(FILE *o,
|
static void show_stage_entry(FILE *o,
|
||||||
const char *label, const struct cache_entry *ce)
|
const char *label, const struct cache_entry *ce)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s%06o %s %d\t%s\n",
|
if (!ce)
|
||||||
|
fprintf(o, "%s (missing)\n", label);
|
||||||
|
else
|
||||||
|
fprintf(o, "%s%06o %s %d\t%s\n",
|
||||||
label,
|
label,
|
||||||
ntohl(ce->ce_mode),
|
ntohl(ce->ce_mode),
|
||||||
sha1_to_hex(ce->sha1),
|
sha1_to_hex(ce->sha1),
|
||||||
|
Reference in New Issue
Block a user