1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-30 03:16:31 +02:00

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:
Junio C Hamano 2005-09-13 22:27:42 -07:00
parent 74376a6864
commit 2ba6c47be1

View File

@ -362,12 +362,15 @@ static int keep_entry(struct cache_entry *ce)
static void show_stage_entry(FILE *o,
const char *label, const struct cache_entry *ce)
{
fprintf(stderr, "%s%06o %s %d\t%s\n",
label,
ntohl(ce->ce_mode),
sha1_to_hex(ce->sha1),
ce_stage(ce),
ce->name);
if (!ce)
fprintf(o, "%s (missing)\n", label);
else
fprintf(o, "%s%06o %s %d\t%s\n",
label,
ntohl(ce->ce_mode),
sha1_to_hex(ce->sha1),
ce_stage(ce),
ce->name);
}
#endif